/*
 * Copyright (C) 2016 MediaTek Inc.
 * Copyright (C) 2021 XiaoMi, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See http://www.gnu.org/licenses/gpl-2.0.html for more details.
 */

/*****************************************************************************
 *
 * Filename:
 * ---------
 *	 s5kgw1spmipiraw_Sensor.c
 *
 * Project:
 * --------
 *	 ALPS
 *
 * Description:
 * ------------
 *	 Source code of Sensor driver
 *
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by CC/CQ. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/
#define PFX "S5KGW1SP_camera_sensor"
//#define pr_fmt(fmt) PFX "[%s] " fmt, __func__

#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/cdev.h>
#include <linux/uaccess.h>
#include <linux/fs.h>
#include <linux/atomic.h>
#include <linux/types.h>

#include "kd_camera_typedef.h"
#include "kd_imgsensor.h"
#include "kd_imgsensor_define.h"
#include "kd_imgsensor_errcode.h"

#include "s5kgw1spmipiraw_Sensor.h"

#define MULTI_WRITE 1

#if MULTI_WRITE
static const int I2C_BUFFER_LEN = 1020; /*trans# max is 255, each 4 bytes*/
#else
static const int I2C_BUFFER_LEN = 4;
#endif

static kal_uint16 camstate;
static kal_uint16 lastcamstate;

static DEFINE_SPINLOCK(imgsensor_drv_lock);

static struct imgsensor_info_struct imgsensor_info = {
	.sensor_id = S5KGW1SP_SENSOR_ID,
	.checksum_value = 0x362cca75,

	.pre = {
		.pclk = 1920000000, /*//16MP 24.5fps case*/
		.linelength = 12304, /*//0x54C0*/
		.framelength = 5200, /*//0x0E20*/
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 4640, /*//0x1220*/
		.grabwindow_height = 3472, /*//0x0D90*/
		//grabwindow_height should be 16's N times
		.mipi_data_lp2hs_settle_dc = 0x22,/*// cphy  need to confirm from HQ*/
		.max_framerate = 300,
		.mipi_pixel_rate = 770000000,
	},
	.cap = {
		.pclk = 1920000000, /*//64MP 6.3fps case*/
		.linelength = 13418, /*//0xA040*/
		.framelength = 9520, /*//0x1D06*/
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 9280, /*//0x2440*/
		.grabwindow_height = 6944, /*//0x1B20*/
		//grabwindow_height should be 16's N times*/
		.mipi_data_lp2hs_settle_dc = 0x22,/*// cphy  need to confirm from HQ*/
		.max_framerate = 150,
		.mipi_pixel_rate = 1580000000,
	},
	.cap1 = {
		.pclk = 960000000, /*// 4MP 69fps case*/
		.linelength = 15360, /*//0x3C00*/
		.framelength = 1262, /*//0x04EE*/
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 2320, /*//0x0910*/
		.grabwindow_height = 1736, /*//0x06C8*/
		//grabwindow_height should be 16's N times*/
		.mipi_data_lp2hs_settle_dc = 85,
		.max_framerate = 1200,
	},
	.cap2 = {
		.pclk = 960000000, /*// 4MP 69fps case*/
		.linelength = 15360, /*//0x3C00*/
		.framelength = 1262, /*//0x04EE*/
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 2320, /*//0x0910*/
		.grabwindow_height = 1736, /*//0x06C8*/
		//grabwindow_height should be 16's N times*/
		.mipi_data_lp2hs_settle_dc = 85,
		.max_framerate = 1200,
	},
	.normal_video = {
		.pclk = 1920000000, /*//16MP 24.5fps case*/
		.linelength = 12304, /*//0x54C0*/
		.framelength = 5200, /*//0x0E20*/
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 4640, /*//0x1220*/
		.grabwindow_height = 3472, /*//0x0D90*/
		//grabwindow_height should be 16's N times
		.mipi_data_lp2hs_settle_dc = 0x22,/*// cphy  need to confirm from HQ*/
		.max_framerate = 300,
		.mipi_pixel_rate = 770000000,
	},
	.hs_video = {/*slow motion*/
		.pclk = 1920000000,
		.linelength = 3344,
		.framelength = 2384,
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 1920, /*//0x0910*/
		.grabwindow_height = 1080, /*//0x06C8*/
		//grabwindow_height should be 16's N times*/
		.mipi_data_lp2hs_settle_dc = 0x22,/*// cphy  need to confirm from HQ*/
		.max_framerate = 2400,
		.mipi_pixel_rate = 1518000000,
	},

	.custom1 = {//slow motion 1080p 120fps
		.pclk = 1920000000,
		.linelength = 7808,
		.framelength = 2042,
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 1920,
		.grabwindow_height = 1080,

		.mipi_data_lp2hs_settle_dc = 0x22,
		.max_framerate = 1200,
		.mipi_pixel_rate = 1518000000,
	},

	.slim_video = {/*VT Call*/
		.pclk = 960000000, /*// 4MP 69fps case*/
		.linelength = 15360, /*//0x3C00*/
		.framelength = 1262, /*//0x04EE*/
		.startx = 0,
		.starty = 0,
		.grabwindow_width = 2320, /*//0x0910*/
		.grabwindow_height = 1736, /*//0x06C8*/
		//grabwindow_height should be 16's N times*/
		.mipi_data_lp2hs_settle_dc = 85,
		.max_framerate = 1200,
		.mipi_pixel_rate = 560000000,
	},
	.margin = 8,		/* sensor framelength & shutter margin */
	.min_shutter = 4,	/* min shutter */

	/* max framelength by sensor register's limitation */
	.max_frame_length = 0xffff,

	/* shutter delay frame for AE cycle,
	 * 2 frame with ispGain_delay-shut_delay=2-0=2
	 */
	.ae_shut_delay_frame = 0,

	/* sensor gain delay frame for AE cycle,
	 * 2 frame with ispGain_delay-sensor_gain_delay=2-0=2
	 */
	.ae_sensor_gain_delay_frame = 0,

	.ae_ispGain_delay_frame = 2,	/* isp gain delay frame for AE cycle */
	.ihdr_support = 0,	/* 1, support; 0,not support */
	.ihdr_le_firstline = 0,	/* 1,le first ; 0, se first */
	.sensor_mode_num = 7,	/* support sensor mode num */

	.cap_delay_frame = 3,	/* enter capture delay frame num */
	.pre_delay_frame = 3,	/* enter preview delay frame num */
	.video_delay_frame = 3,	/* enter video delay frame num */

	/* enter high speed video  delay frame num */
	.hs_video_delay_frame = 3,

	.slim_video_delay_frame = 3,	/* enter slim video delay frame num */
	.custom1_delay_frame = 3,	/* enter custom1 delay frame num */

	.isp_driving_current = ISP_DRIVING_8MA,	/* mclk driving current */

	/* sensor_interface_type */
	.sensor_interface_type = SENSOR_INTERFACE_TYPE_MIPI,

	/* 0,MIPI_OPHY_NCSI2;  1,MIPI_OPHY_CSI2 */
	.mipi_sensor_type = MIPI_CPHY,

	/* 0,MIPI_SETTLEDELAY_AUTO; 1,MIPI_SETTLEDELAY_MANNUAL */
	.mipi_settle_delay_mode = 1,
	.sensor_output_dataformat = SENSOR_OUTPUT_FORMAT_RAW_4CELL_HW_BAYER_Gr,
	//.sensor_output_dataformat = SENSOR_OUTPUT_FORMAT_RAW_Gr,
	.mclk = 24,	/* mclk value, suggest 24 or 26 for 24Mhz or 26Mhz */
	.mipi_lane_num = SENSOR_MIPI_3_LANE,
	//.i2c_speed = 1000, /*support 1MHz write*/
	/* record sensor support all write id addr,
	 * only supprt 4 must end with 0xff
	 */
	//.i2c_addr_table = { 0x20, 0x5a, 0xff},
	.i2c_addr_table = { 0x5a, 0xff},
};

static struct imgsensor_struct imgsensor = {
	.mirror = IMAGE_NORMAL,	/* mirrorflip information */

	/* IMGSENSOR_MODE enum value,record current sensor mode,such as:
	 * INIT, Preview, Capture, Video,High Speed Video, Slim Video
	 */
	.sensor_mode = IMGSENSOR_MODE_INIT,

	.shutter = 0x3D0,	/* current shutter */
	.gain = 0x100,		/* current gain */
	.dummy_pixel = 0,	/* current dummypixel */
	.dummy_line = 0,	/* current dummyline */
	.current_fps = 0,	/* full size current fps : 24fps for PIP,
				 * 30fps for Normal or ZSD
				 */

	/* auto flicker enable: KAL_FALSE for disable auto flicker,
	 * KAL_TRUE for enable auto flicker
	 */
	.autoflicker_en = KAL_FALSE,

		/* test pattern mode or not.
		 * KAL_FALSE for in test pattern mode,
		 * KAL_TRUE for normal output
		 */
	.test_pattern = KAL_FALSE,

	/* current scenario id */
	.current_scenario_id = MSDK_SCENARIO_ID_CAMERA_PREVIEW,
	.ihdr_en = 0,
	/* sensor need support LE, SE with HDR feature */

	.hdr_mode = KAL_FALSE,
	/* HDR Mode : 0: disable HDR, 1:IHDR, 2:HDR, 9:ZHDR */
	.i2c_write_id = 0x5a,
	/* record current sensor's i2c write id */

};

//int chip_id;
/* VC_Num, VC_PixelNum, ModeSelect, EXPO_Ratio, ODValue, RG_STATSMODE */
/* VC0_ID, VC0_DataType, VC0_SIZEH, VC0_SIZE,
 * VC1_ID, VC1_DataType, VC1_SIZEH, VC1_SIZEV
 */
/* VC2_ID, VC2_DataType, VC2_SIZEH, VC2_SIZE,
 * VC3_ID, VC3_DataType, VC3_SIZEH, VC3_SIZEV
 */

/*static struct SENSOR_VC_INFO_STRUCT SENSOR_VC_INFO[3]=
 *  {// Preview mode setting
 *  {0x02, 0x0A,   0x00,   0x08, 0x40, 0x00,
 *  0x00, 0x2B, 0x0910, 0x06D0, 0x01, 0x00, 0x0000, 0x0000,
 *  0x02, 0x30, 0x00B4, 0x0360, 0x03, 0x00, 0x0000, 0x0000},
 * // Video mode setting
 *{0x02, 0x0A,   0x00,   0x08, 0x40, 0x00,
 *0x00, 0x2B, 0x1220, 0x0DA0, 0x01, 0x00, 0x0000, 0x0000,
 *0x02, 0x30, 0x00B4, 0x0360, 0x03, 0x00, 0x0000, 0x0000},
 * // Capture mode setting
 *{0x02, 0x0A,   0x00,   0x08, 0x40, 0x00,
 *0x00, 0x2B, 0x1220, 0x0DA0, 0x01, 0x00, 0x0000, 0x0000,
 *0x02, 0x30, 0x00B4, 0x0360, 0x03, 0x00, 0x0000, 0x0000}};
 */

/* Sensor output window information */
static struct SENSOR_WINSIZE_INFO_STRUCT imgsensor_winsize_info[6] = {
	{9280, 6944, 0, 0, 9280, 6944, 4640, 3472, 0, 0, 4640, 3472,
	0, 0, 4640, 3472},/* Preview */

	{9280, 6944, 0, 0, 9280, 6944, 9280, 6944, 0, 0, 9280, 6944,
	0, 0, 9280, 6944},/* Capture */

	{9280, 6944, 0, 0, 9280, 6944, 4640, 3472, 0, 0, 4640, 3472,
	0, 0, 4640, 3472},/* Video */

	{9280, 6944, 800, 1312, 7680, 4320, 1920, 1080, 0, 0, 1920, 1080,
	0, 0, 1920, 1080},/* HS_VID SMVR 240FPS 1080P */

	{1920, 1080, 0, 0, 1920, 1080, 1920, 1080, 0, 0, 1920, 1080,
	0, 0, 1920, 1080},

	{9280, 6944, 800, 1312, 7680, 4320, 1920, 1080, 0, 0, 1920, 1080,
	0, 0, 1920, 1080},   /*custom1 for 120fps 1080p*/
};

/* no mirror flip, and no binning -revised by dj */
/* static struct struct SET_PD_BLOCK_INFO_T imgsensor_pd_info = {
 * .i4OffsetX = 16,
 * .i4OffsetY = 16,
 * .i4PitchX  = 64,
 * .i4PitchY  = 64,
 * .i4PairNum  =16,
 * .i4SubBlkW  =16,
 * .i4SubBlkH  =16,
 * .i4PosL = {{20,23},{72,23},{36,27},{56,27},{24,43},{68,43},{40,47},
 * {52,47},{40,55},{52,55},{24,59},{68,59},{36,75},{56,75},{20,79},{72,79}},
 * .i4PosR = {{20,27},{72,27},{36,31},{56,31},{24,39},{68,39},{40,43},{52,43},
 * {40,59},{52,59},{24,63},{68,63},{36,71},{56,71},{20,75},{72,75}},
 * .iMirrorFlip = 0,
 * .i4BlockNumX = 72,
 * .i4BlockNumY = 54,
 * };
 */

#if 0
static kal_uint16 read_cmos_sensor(kal_uint32 addr)
{
	kal_uint16 get_byte = 0;

	iReadReg((u16) addr, (u8 *) &get_byte, imgsensor.i2c_write_id);
	return get_byte;
}

#define write_cmos_sensor(addr, para) iWriteReg(\
	(u16) addr, (u32) para, 1,  imgsensor.i2c_write_id)
#endif
#define RWB_ID_OFFSET 0x0F73
#define EEPROM_READ_ID  0x19
#define EEPROM_WRITE_ID   0x18

#if 0
static kal_uint16 is_RWB_sensor(void)
{
	kal_uint16 get_byte = 0;

	char pusendcmd[2] = {
		(char)(RWB_ID_OFFSET >> 8), (char)(RWB_ID_OFFSET & 0xFF) };

	iReadRegI2C(pusendcmd, 2, (u8 *) &get_byte, 1, EEPROM_READ_ID);
	return get_byte;
}
#endif

static void write_cmos_sensor(kal_uint16 addr, kal_uint16 para)
{
	char pusendcmd[4] = {
		(char)(addr >> 8), (char)(addr & 0xFF),
		(char)(para >> 8), (char)(para & 0xFF) };
	iWriteRegI2C(pusendcmd, 4, imgsensor.i2c_write_id);
}

static kal_uint16 read_cmos_sensor_8(kal_uint16 addr)
{
	kal_uint16 get_byte = 0;
	char pusendcmd[2] = { (char)(addr >> 8), (char)(addr & 0xFF) };

	iReadRegI2C(pusendcmd, 2, (u8 *) &get_byte, 1, imgsensor.i2c_write_id);
	return get_byte;
}

static void write_cmos_sensor_8(kal_uint16 addr, kal_uint8 para)
{
	char pusendcmd[3] = {
		(char)(addr >> 8), (char)(addr & 0xFF), (char)(para & 0xFF) };

	iWriteRegI2C(pusendcmd, 3, imgsensor.i2c_write_id);
}

static kal_uint32 return_sensor_id(void)
{
	kal_uint32 sensor_id = 0, revision = 0;

	sensor_id = ((read_cmos_sensor_8(0x0000) << 8) | read_cmos_sensor_8(0x0001));

	revision = read_cmos_sensor_8(0x0002);

	if (0xA0 == revision) {
		sensor_id -= 1;
		printk("sensor_id: 0x%x revision: 0x%x EVT0.0", sensor_id, revision);
	}

	return sensor_id;
}

static void set_dummy(void)
{
	pr_debug("dummyline = %d, dummypixels = %d\n",
		imgsensor.dummy_line, imgsensor.dummy_pixel);

	/* return; //for test */
	write_cmos_sensor(0x0340, imgsensor.frame_length);
	write_cmos_sensor(0x0342, imgsensor.line_length);
}				/*      set_dummy  */

static void set_max_framerate(UINT16 framerate, kal_bool min_framelength_en)
{

	kal_uint32 frame_length = imgsensor.frame_length;

	pr_debug("framerate = %d, min framelength should enable %d\n",
		framerate, min_framelength_en);

	frame_length = imgsensor.pclk / framerate * 10 / imgsensor.line_length;
	spin_lock(&imgsensor_drv_lock);
	if (frame_length >= imgsensor.min_frame_length)
		imgsensor.frame_length = frame_length;
	else
		imgsensor.frame_length = imgsensor.min_frame_length;

	imgsensor.dummy_line =
		imgsensor.frame_length - imgsensor.min_frame_length;

	if (imgsensor.frame_length > imgsensor_info.max_frame_length) {
		imgsensor.frame_length = imgsensor_info.max_frame_length;

		imgsensor.dummy_line =
			imgsensor.frame_length - imgsensor.min_frame_length;
	}
	if (min_framelength_en)
		imgsensor.min_frame_length = imgsensor.frame_length;
	spin_unlock(&imgsensor_drv_lock);
	set_dummy();
}				/*      set_max_framerate  */

static void write_shutter(kal_uint16 shutter)
{

	kal_uint16 realtime_fps = 0;

	spin_lock(&imgsensor_drv_lock);
	if (shutter > imgsensor.min_frame_length - imgsensor_info.margin)
		imgsensor.frame_length = shutter + imgsensor_info.margin;
	else
		imgsensor.frame_length = imgsensor.min_frame_length;
	if (imgsensor.frame_length > imgsensor_info.max_frame_length)
		imgsensor.frame_length = imgsensor_info.max_frame_length;
	spin_unlock(&imgsensor_drv_lock);
	if (shutter < imgsensor_info.min_shutter)
		shutter = imgsensor_info.min_shutter;

	if (imgsensor.autoflicker_en) {
		realtime_fps = imgsensor.pclk
			/ imgsensor.line_length * 10 / imgsensor.frame_length;

		if (realtime_fps >= 297 && realtime_fps <= 305)
			set_max_framerate(296, 0);
		else if (realtime_fps >= 147 && realtime_fps <= 150)
			set_max_framerate(146, 0);
		else {
			/* Extend frame length */
			write_cmos_sensor(0x0340, imgsensor.frame_length);

		}
	} else {
		/* Extend frame length */
		write_cmos_sensor(0x0340, imgsensor.frame_length);
		pr_debug("(else)imgsensor.frame_length = %d\n",
			imgsensor.frame_length);

	}
	/* Update Shutter */
	write_cmos_sensor(0x0202, shutter);
	pr_debug("shutter =%d, framelength =%d\n",
		shutter, imgsensor.frame_length);

}				/*      write_shutter  */

/*************************************************************************
 * FUNCTION
 *	set_shutter
 *
 * DESCRIPTION
 *	This function set e-shutter of sensor to change exposure time.
 *
 * PARAMETERS
 *	iShutter : exposured lines
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static void set_shutter(kal_uint16 shutter)
{
	unsigned long flags;

	spin_lock_irqsave(&imgsensor_drv_lock, flags);
	imgsensor.shutter = shutter;
	spin_unlock_irqrestore(&imgsensor_drv_lock, flags);

	write_shutter(shutter);
}				/*      set_shutter */

static void set_shutter_frame_length(kal_uint16 shutter,
			kal_uint16 frame_length)
{
	unsigned long flags;
	kal_uint16 realtime_fps = 0;
	kal_int32 dummy_line = 0;

	spin_lock_irqsave(&imgsensor_drv_lock, flags);
	imgsensor.shutter = shutter;
	spin_unlock_irqrestore(&imgsensor_drv_lock, flags);

	spin_lock(&imgsensor_drv_lock);
	/*Change frame time*/
	dummy_line = frame_length - imgsensor.frame_length;
	imgsensor.frame_length = imgsensor.frame_length + dummy_line;
	imgsensor.min_frame_length = imgsensor.frame_length;
	//
	if (shutter > imgsensor.min_frame_length - imgsensor_info.margin)
		imgsensor.frame_length = shutter + imgsensor_info.margin;
	else
		imgsensor.frame_length = imgsensor.min_frame_length;
	if (imgsensor.frame_length > imgsensor_info.max_frame_length)
		imgsensor.frame_length = imgsensor_info.max_frame_length;
	spin_unlock(&imgsensor_drv_lock);
	shutter = (shutter < imgsensor_info.min_shutter) ?
		imgsensor_info.min_shutter : shutter;
	shutter = (shutter > (imgsensor_info.max_frame_length -
		imgsensor_info.margin)) ? (imgsensor_info.max_frame_length -
		imgsensor_info.margin) : shutter;

	if (imgsensor.autoflicker_en) {
		realtime_fps = imgsensor.pclk /
			imgsensor.line_length * 10 / imgsensor.frame_length;
		if (realtime_fps >= 297 && realtime_fps <= 305)
			set_max_framerate(296, 0);
		else if (realtime_fps >= 147 && realtime_fps <= 150)
			set_max_framerate(146, 0);
		else {
			// Extend frame length
			//write_cmos_sensor(0x0104, 0x01);
			write_cmos_sensor(0x0340, imgsensor.frame_length);
			//write_cmos_sensor(0x0104, 0x00);
		}
	} else {
		// Extend frame length
		//write_cmos_sensor(0x0104, 0x01);
		write_cmos_sensor(0x0340,  imgsensor.frame_length);
		//write_cmos_sensor(0x0104, 0x00);
	}

	// Update Shutter
	//write_cmos_sensor(0x0104, 0x01);
	write_cmos_sensor(0x0202, shutter);
	//write_cmos_sensor(0x0104, 0x00);
	printk("Add for N3D! shutter =%d, framelength =%d\n",
		shutter, imgsensor.frame_length);

}

static kal_uint16 gain2reg(const kal_uint16 gain)
{
	kal_uint16 reg_gain = 0x0;

	reg_gain = gain / 2;
	return (kal_uint16) reg_gain;
}

/*************************************************************************
 * FUNCTION
 *	set_gain
 *
 * DESCRIPTION
 *	This function is to set global gain to sensor.
 *
 * PARAMETERS
 *	iGain : sensor global gain(base: 0x40)
 *
 * RETURNS
 *	the actually gain set to sensor.
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static kal_uint16 set_gain(kal_uint16 gain)
{
	kal_uint16 reg_gain;

	/* gain=1024;//for test */
	/* return; //for test */

	if (gain < BASEGAIN || gain > 16 * BASEGAIN) {
		pr_debug("Error gain setting");

		if (gain < BASEGAIN)
			gain = BASEGAIN;
		else if (gain > 16 * BASEGAIN)
			gain = 16 * BASEGAIN;
	}

	reg_gain = gain2reg(gain);
	spin_lock(&imgsensor_drv_lock);
	imgsensor.gain = reg_gain;
	spin_unlock(&imgsensor_drv_lock);
	pr_debug("gain = %d , reg_gain = 0x%x\n ", gain, reg_gain);

	write_cmos_sensor(0x0204, reg_gain);
	/* write_cmos_sensor_8(0x0204,(reg_gain>>8)); */
	/* write_cmos_sensor_8(0x0205,(reg_gain&0xff)); */

	return gain;
}				/*      set_gain  */

static void set_mirror_flip(kal_uint8 image_mirror)
{

	kal_uint8 itemp;

	pr_debug("image_mirror = %d\n", image_mirror);
	itemp = read_cmos_sensor_8(0x0101);
	itemp &= ~0x03;

	switch (image_mirror) {

	case IMAGE_NORMAL:
		write_cmos_sensor_8(0x0101, itemp);
		break;

	case IMAGE_V_MIRROR:
		write_cmos_sensor_8(0x0101, itemp | 0x02);
		break;

	case IMAGE_H_MIRROR:
		write_cmos_sensor_8(0x0101, itemp | 0x01);
		break;

	case IMAGE_HV_MIRROR:
		write_cmos_sensor_8(0x0101, itemp | 0x03);
		break;
	}
}

/*************************************************************************
 * FUNCTION
 *	night_mode
 *
 * DESCRIPTION
 *	This function night mode of sensor.
 *
 * PARAMETERS
 *	bEnable: KAL_TRUE -> enable night mode, otherwise, disable night mode
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
#if 0
static void night_mode(kal_bool enable)
{
	/*No Need to implement this function*/
}				/*      night_mode      */
#endif



/*************************************************************************
 * FUNCTION
 *	check_stremoff
 *
 * DESCRIPTION
 *	waiting function until sensor streaming finish.
 *
 * PARAMETERS
 *	None
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/

static void check_streamoff(void)
{
	unsigned int i = 0;
	int timeout = (10000 / imgsensor.current_fps) + 1;

	mdelay(3);
	for (i = 0; i < timeout; i++) {
		if (read_cmos_sensor_8(0x0005) != 0xFF)
			mdelay(1);
		else
			break;
	}
	pr_debug(" %s exit! %d\n", __func__, i);
}

static kal_uint32 streaming_control(kal_bool enable)
{
	pr_debug("streaming_enable(0=Sw Standby,1=streaming): %d\n", enable);

	if (enable) {
		mdelay(5);
		write_cmos_sensor_8(0x0100, 0x01);
		mdelay(5);
	} else {
		write_cmos_sensor_8(0x0100, 0x00);
		check_streamoff();
	}
	return ERROR_NONE;
}

static kal_uint16 table_write_cmos_sensor(kal_uint16 *para, kal_uint32 len)
{
	char puSendCmd[I2C_BUFFER_LEN];
	kal_uint32 tosend, IDX;
	kal_uint16 addr = 0, addr_last = 0, data;

	tosend = 0;
	IDX = 0;

	while (len > IDX) {
		addr = para[IDX];
		{
			puSendCmd[tosend++] = (char)(addr >> 8);
			puSendCmd[tosend++] = (char)(addr & 0xFF);
			data = para[IDX + 1];
			puSendCmd[tosend++] = (char)(data >> 8);
			puSendCmd[tosend++] = (char)(data & 0xFF);
			IDX += 2;
			addr_last = addr;

		}

#if MULTI_WRITE
	if ((I2C_BUFFER_LEN - tosend) < 4 || IDX == len || addr != addr_last) {
		iBurstWriteReg_multi(puSendCmd, tosend,
			imgsensor.i2c_write_id, 4, imgsensor_info.i2c_speed);

			tosend = 0;
	}
#else
		iWriteRegI2CTiming(puSendCmd, 4,
			imgsensor.i2c_write_id, imgsensor_info.i2c_speed);

		tosend = 0;
#endif

	}
	return 0;
}

static kal_uint16 addr_data_pair_init_gw1[] = {
	0x6028, 0x2001,
	0x602A, 0xB8B8,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0649,
	0x6F12, 0x0548,
	0x6F12, 0xC1F8,
	0x6F12, 0x6807,
	0x6F12, 0x0549,
	0x6F12, 0x081A,
	0x6F12, 0x0349,
	0x6F12, 0xA1F8,
	0x6F12, 0x6C07,
	0x6F12, 0x01F0,
	0x6F12, 0x76BA,
	0x6F12, 0x0000,
	0x6F12, 0x2001,
	0x6F12, 0xF998,
	0x6F12, 0x2001,
	0x6F12, 0x35A0,
	0x6F12, 0x2002,
	0x6F12, 0x3C00,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0xFE48,
	0x6F12, 0x0078,
	0x6F12, 0x80B1,
	0x6F12, 0xFE49,
	0x6F12, 0x0228,
	0x6F12, 0x13D0,
	0x6F12, 0x5631,
	0x6F12, 0x0888,
	0x6F12, 0x8988,
	0x6F12, 0x0843,
	0x6F12, 0x4FF6,
	0x6F12, 0xFF71,
	0x6F12, 0x01EA,
	0x6F12, 0x4012,
	0x6F12, 0x4FF4,
	0x6F12, 0xFC61,
	0x6F12, 0x4FF2,
	0x6F12, 0x0240,
	0x6F12, 0x01F0,
	0x6F12, 0x4EBB,
	0x6F12, 0xF648,
	0x6F12, 0xF749,
	0x6F12, 0xB0F8,
	0x6F12, 0x0405,
	0x6F12, 0x0880,
	0x6F12, 0x7047,
	0x6F12, 0x5431,
	0x6F12, 0xEAE7,
	0x6F12, 0x30B5,
	0x6F12, 0xF248,
	0x6F12, 0x90F8,
	0x6F12, 0xC810,
	0x6F12, 0x09B1,
	0x6F12, 0x0221,
	0x6F12, 0x05E0,
	0x6F12, 0x90F8,
	0x6F12, 0xC700,
	0x6F12, 0x08B1,
	0x6F12, 0x0121,
	0x6F12, 0x00E0,
	0x6F12, 0x0021,
	0x6F12, 0xEA48,
	0x6F12, 0xEA4B,
	0x6F12, 0x1030,
	0x6F12, 0x42F2,
	0x6F12, 0xFC54,
	0x6F12, 0x0170,
	0x6F12, 0x0020,
	0x6F12, 0x03EB,
	0x6F12, 0x0112,
	0x6F12, 0x02EB,
	0x6F12, 0x8001,
	0x6F12, 0x4D8C,
	0x6F12, 0x898C,
	0x6F12, 0x2D02,
	0x6F12, 0xB5FB,
	0x6F12, 0xF1F1,
	0x6F12, 0x03EB,
	0x6F12, 0xC005,
	0x6F12, 0x401C,
	0x6F12, 0x2953,
	0x6F12, 0x0428,
	0x6F12, 0xF2D3,
	0x6F12, 0x30BD,
	0x6F12, 0x2DE9,
	0x6F12, 0xF04F,
	0x6F12, 0xDFF8,
	0x6F12, 0x7883,
	0x6F12, 0x8346,
	0x6F12, 0xDC49,
	0x6F12, 0x98F8,
	0x6F12, 0x2100,
	0x6F12, 0x091D,
	0x6F12, 0x18B1,
	0x6F12, 0xDD48,
	0x6F12, 0x90F8,
	0x6F12, 0xF600,
	0x6F12, 0x08B3,
	0x6F12, 0x0020,
	0x6F12, 0xD74B,
	0x6F12, 0x4FF6,
	0x6F12, 0xFF7A,
	0x6F12, 0x4FF4,
	0x6F12, 0x8059,
	0x6F12, 0x1870,
	0x6F12, 0xD848,
	0x6F12, 0x00F5,
	0x6F12, 0xA66C,
	0x6F12, 0xB0F8,
	0x6F12, 0x3025,
	0x6F12, 0x0AEA,
	0x6F12, 0xC202,
	0x6F12, 0x4A80,
	0x6F12, 0x1878,
	0x6F12, 0x38B3,
	0x6F12, 0xB8F8,
	0x6F12, 0x5240,
	0x6F12, 0xA242,
	0x6F12, 0x0ED2,
	0x6F12, 0x0120,
	0x6F12, 0x1870,
	0x6F12, 0x0020,
	0x6F12, 0x4C46,
	0x6F12, 0x08EB,
	0x6F12, 0xC005,
	0x6F12, 0x05F5,
	0x6F12, 0x1855,
	0x6F12, 0x401C,
	0x6F12, 0x2C60,
	0x6F12, 0x0428,
	0x6F12, 0xF7D3,
	0x6F12, 0x16E0,
	0x6F12, 0x0120,
	0x6F12, 0xDCE7,
	0x6F12, 0x0220,
	0x6F12, 0x1870,
	0x6F12, 0x1002,
	0x6F12, 0xB0FB,
	0x6F12, 0xF4F0,
	0x6F12, 0x82B2,
	0x6F12, 0x0020,
	0x6F12, 0x2503,
	0x6F12, 0x42F2,
	0x6F12, 0xFC56,
	0x6F12, 0x08EB,
	0x6F12, 0xC004,
	0x6F12, 0x401C,
	0x6F12, 0xA75B,
	0x6F12, 0x04F5,
	0x6F12, 0x1854,
	0x6F12, 0xB5FB,
	0x6F12, 0xF7F7,
	0x6F12, 0x2760,
	0x6F12, 0x0428,
	0x6F12, 0xF4D3,
	0x6F12, 0x4C46,
	0x6F12, 0xA242,
	0x6F12, 0x02D9,
	0x6F12, 0x8A60,
	0x6F12, 0x4A46,
	0x6F12, 0x00E0,
	0x6F12, 0x8C60,
	0x6F12, 0xBB4D,
	0x6F12, 0xD008,
	0x6F12, 0x1203,
	0x6F12, 0xA5F8,
	0x6F12, 0x3005,
	0x6F12, 0xABF8,
	0x6F12, 0x1A00,
	0x6F12, 0x1878,
	0x6F12, 0x0870,
	0x6F12, 0xBCF8,
	0x6F12, 0x0030,
	0x6F12, 0x0AEA,
	0x6F12, 0xC300,
	0x6F12, 0x8880,
	0x6F12, 0xB2FB,
	0x6F12, 0xF0F0,
	0x6F12, 0xA042,
	0x6F12, 0x03D0,
	0x6F12, 0x8A68,
	0x6F12, 0x4243,
	0x6F12, 0x100B,
	0x6F12, 0x8860,
	0x6F12, 0xBDE8,
	0x6F12, 0xF08F,
	0x6F12, 0x2DE9,
	0x6F12, 0xF047,
	0x6F12, 0x8146,
	0x6F12, 0x1E46,
	0x6F12, 0x9046,
	0x6F12, 0x0D46,
	0x6F12, 0x0846,
	0x6F12, 0xFFF7,
	0x6F12, 0x91FF,
	0x6F12, 0xA848,
	0x6F12, 0x0022,
	0x6F12, 0x4C38,
	0x6F12, 0x0068,
	0x6F12, 0x87B2,
	0x6F12, 0x040C,
	0x6F12, 0x3946,
	0x6F12, 0x2046,
	0x6F12, 0x01F0,
	0x6F12, 0xAEFA,
	0x6F12, 0x3346,
	0x6F12, 0x4246,
	0x6F12, 0x2946,
	0x6F12, 0x4846,
	0x6F12, 0x01F0,
	0x6F12, 0xADFA,
	0x6F12, 0x3946,
	0x6F12, 0x2046,
	0x6F12, 0xBDE8,
	0x6F12, 0xF047,
	0x6F12, 0x0122,
	0x6F12, 0x01F0,
	0x6F12, 0xA1BA,
	0x6F12, 0x70B5,
	0x6F12, 0x9B4B,
	0x6F12, 0x1B78,
	0x6F12, 0xEBB1,
	0x6F12, 0x994B,
	0x6F12, 0x9A4E,
	0x6F12, 0x0C33,
	0x6F12, 0x1B68,
	0x6F12, 0x5343,
	0x6F12, 0x03F5,
	0x6F12, 0x0063,
	0x6F12, 0x1D0B,
	0x6F12, 0x0022,
	0x6F12, 0x06EB,
	0x6F12, 0xC203,
	0x6F12, 0x03F5,
	0x6F12, 0x1853,
	0x6F12, 0x51F8,
	0x6F12, 0x2240,
	0x6F12, 0x1B68,
	0x6F12, 0x6B43,
	0x6F12, 0x03F5,
	0x6F12, 0x0063,
	0x6F12, 0x1B0B,
	0x6F12, 0x5C43,
	0x6F12, 0x04F5,
	0x6F12, 0x0064,
	0x6F12, 0x230B,
	0x6F12, 0x40F8,
	0x6F12, 0x2230,
	0x6F12, 0x521C,
	0x6F12, 0x042A,
	0x6F12, 0xEBD3,
	0x6F12, 0x70BD,
	0x6F12, 0x51F8,
	0x6F12, 0x2340,
	0x6F12, 0x5443,
	0x6F12, 0x04F5,
	0x6F12, 0x0064,
	0x6F12, 0x240B,
	0x6F12, 0x40F8,
	0x6F12, 0x2340,
	0x6F12, 0x5B1C,
	0x6F12, 0x042B,
	0x6F12, 0xF4D3,
	0x6F12, 0x70BD,
	0x6F12, 0x70B5,
	0x6F12, 0x8548,
	0x6F12, 0x0022,
	0x6F12, 0x4C38,
	0x6F12, 0x8168,
	0x6F12, 0x0C0C,
	0x6F12, 0x8DB2,
	0x6F12, 0x2946,
	0x6F12, 0x2046,
	0x6F12, 0x01F0,
	0x6F12, 0x68FA,
	0x6F12, 0x01F0,
	0x6F12, 0x70FA,
	0x6F12, 0x0122,
	0x6F12, 0x2946,
	0x6F12, 0x2046,
	0x6F12, 0x01F0,
	0x6F12, 0x61FA,
	0x6F12, 0x7C48,
	0x6F12, 0x008C,
	0x6F12, 0x08B1,
	0x6F12, 0xFFF7,
	0x6F12, 0x11FF,
	0x6F12, 0x7949,
	0x6F12, 0x0020,
	0x6F12, 0x6231,
	0x6F12, 0x0870,
	0x6F12, 0x70BD,
	0x6F12, 0x7748,
	0x6F12, 0x008C,
	0x6F12, 0x0028,
	0x6F12, 0x00D0,
	0x6F12, 0xEAE6,
	0x6F12, 0x7047,
	0x6F12, 0x2DE9,
	0x6F12, 0xF74F,
	0x6F12, 0x0446,
	0x6F12, 0x2DED,
	0x6F12, 0x0C8B,
	0x6F12, 0x82B0,
	0x6F12, 0x9346,
	0x6F12, 0x7148,
	0x6F12, 0xB0F8,
	0x6F12, 0x5C00,
	0x6F12, 0x68B3,
	0x6F12, 0x7348,
	0x6F12, 0x90F8,
	0x6F12, 0x6800,
	0x6F12, 0x00B1,
	0x6F12, 0x0120,
	0x6F12, 0x84F8,
	0x6F12, 0x700A,
	0x6F12, 0x0021,
	0x6F12, 0x6A48,
	0x6F12, 0xA4F8,
	0x6F12, 0x8A10,
	0x6F12, 0xA4F8,
	0x6F12, 0x8C10,
	0x6F12, 0x3830,
	0x6F12, 0x0090,
	0x6F12, 0x0180,
	0x6F12, 0x04F1,
	0x6F12, 0xD005,
	0x6F12, 0x8A46,
	0x6F12, 0xDFED,
	0x6F12, 0x6AAA,
	0x6F12, 0x9FED,
	0x6F12, 0x6ABA,
	0x6F12, 0x9FED,
	0x6F12, 0x6AAA,
	0x6F12, 0xF0EE,
	0x6F12, 0x009A,
	0x6F12, 0xB7EE,
	0x6F12, 0x009A,
	0x6F12, 0xF6EE,
	0x6F12, 0x008A,
	0x6F12, 0xA0F5,
	0x6F12, 0x0878,
	0x6F12, 0x04EB,
	0x6F12, 0x4A00,
	0x6F12, 0x00F6,
	0x6F12, 0x9611,
	0x6F12, 0x0191,
	0x6F12, 0xB0F8,
	0x6F12, 0x9619,
	0x6F12, 0x8146,
	0x6F12, 0x0B46,
	0x6F12, 0xA21C,
	0x6F12, 0xB4F8,
	0x6F12, 0x8A00,
	0x6F12, 0x20E0,
	0x6F12, 0x5848,
	0x6F12, 0x0022,
	0x6F12, 0x4C38,
	0x6F12, 0x0069,
	0x6F12, 0x86B2,
	0x6F12, 0x050C,
	0x6F12, 0x3146,
	0x6F12, 0x2846,
	0x6F12, 0x01F0,
	0x6F12, 0x0EFA,
	0x6F12, 0x5A46,
	0x6F12, 0x2046,
	0x6F12, 0x0F99,
	0x6F12, 0x01F0,
	0x6F12, 0x18FA,
	0x6F12, 0x02B0,
	0x6F12, 0x3146,
	0x6F12, 0xBDEC,
	0x6F12, 0x0C8B,
	0x6F12, 0x03B0,
	0x6F12, 0x2846,
	0x6F12, 0x0122,
	0x6F12, 0xBDE8,
	0x6F12, 0xF04F,
	0x6F12, 0x01F0,
	0x6F12, 0xFEB9,
	0x6F12, 0x02EB,
	0x6F12, 0x4006,
	0x6F12, 0x7688,
	0x6F12, 0x9E42,
	0x6F12, 0x04D2,
	0x6F12, 0x401C,
	0x6F12, 0x80B2,
	0x6F12, 0x1E28,
	0x6F12, 0xF6D3,
	0x6F12, 0x1E20,
	0x6F12, 0xA4F8,
	0x6F12, 0x8A00,
	0x6F12, 0x04EB,
	0x6F12, 0x4000,
	0x6F12, 0x02EE,
	0x6F12, 0x101A,
	0x6F12, 0xB0F8,
	0x6F12, 0x4420,
	0x6F12, 0x00EE,
	0x6F12, 0x102A,
	0x6F12, 0xB0F8,
	0x6F12, 0x4220,
	0x6F12, 0xB8EE,
	0x6F12, 0x422A,
	0x6F12, 0xF8EE,
	0x6F12, 0x401A,
	0x6F12, 0x00EE,
	0x6F12, 0x102A,
	0x6F12, 0x8288,
	0x6F12, 0x4088,
	0x6F12, 0xB8EE,
	0x6F12, 0x401A,
	0x6F12, 0x00EE,
	0x6F12, 0x102A,
	0x6F12, 0xF8EE,
	0x6F12, 0x400A,
	0x6F12, 0x00EE,
	0x6F12, 0x100A,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0x01F0,
	0x6F12, 0xE8F9,
	0x6F12, 0x84ED,
	0x6F12, 0x210A,
	0x6F12, 0xB9F8,
	0x6F12, 0x9619,
	0x6F12, 0x04F1,
	0x6F12, 0x8C02,
	0x6F12, 0xD4E9,
	0x6F12, 0x3273,
	0x6F12, 0x0E46,
	0x6F12, 0x1088,
	0x6F12, 0x07E0,
	0x6F12, 0x07EB,
	0x6F12, 0x400C,
	0x6F12, 0xBCF8,
	0x6F12, 0x02C0,
	0x6F12, 0xB445,
	0x6F12, 0x04D2,
	0x6F12, 0x401C,
	0x6F12, 0x80B2,
	0x6F12, 0x1E28,
	0x6F12, 0xF5D3,
	0x6F12, 0x1E20,
	0x6F12, 0x8434,
	0x6F12, 0x1080,
	0x6F12, 0x626C,
	0x6F12, 0x0226,
	0x6F12, 0x06EB,
	0x6F12, 0x4006,
	0x6F12, 0x965B,
	0x6F12, 0x32F8,
	0x6F12, 0x1020,
	0x6F12, 0x00EE,
	0x6F12, 0x106A,
	0x6F12, 0x02EE,
	0x6F12, 0x101A,
	0x6F12, 0xF8EE,
	0x6F12, 0x400A,
	0x6F12, 0x00EE,
	0x6F12, 0x102A,
	0x6F12, 0x03EB,
	0x6F12, 0x4002,
	0x6F12, 0x33F8,
	0x6F12, 0x1000,
	0x6F12, 0x5288,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0x01EE,
	0x6F12, 0x102A,
	0x6F12, 0xB8EE,
	0x6F12, 0x422A,
	0x6F12, 0xF8EE,
	0x6F12, 0x411A,
	0x6F12, 0x01EE,
	0x6F12, 0x100A,
	0x6F12, 0xB8EE,
	0x6F12, 0x411A,
	0x6F12, 0x01F0,
	0x6F12, 0xAEF9,
	0x6F12, 0xA088,
	0x6F12, 0x184A,
	0x6F12, 0x00EE,
	0x6F12, 0x900A,
	0x6F12, 0x5E32,
	0x6F12, 0xF8EE,
	0x6F12, 0x600A,
	0x6F12, 0x20EE,
	0x6F12, 0x200A,
	0x6F12, 0x20EE,
	0x6F12, 0x2A0A,
	0x6F12, 0x84ED,
	0x6F12, 0x030A,
	0x6F12, 0xB9F8,
	0x6F12, 0x9609,
	0x6F12, 0x94ED,
	0x6F12, 0x001A,
	0x6F12, 0x00EE,
	0x6F12, 0x900A,
	0x6F12, 0xF8EE,
	0x6F12, 0x600A,
	0x6F12, 0x00EE,
	0x6F12, 0xC01A,
	0x6F12, 0x84ED,
	0x6F12, 0x041A,
	0x6F12, 0x0198,
	0x6F12, 0x009B,
	0x6F12, 0x666C,
	0x6F12, 0x0188,
	0x6F12, 0x843C,
	0x6F12, 0x0F46,
	0x6F12, 0x1888,
	0x6F12, 0x07E0,
	0x6F12, 0x06EB,
	0x6F12, 0x400C,
	0x6F12, 0xBCF8,
	0x6F12, 0x02C0,
	0x6F12, 0xBC45,
	0x6F12, 0x04D2,
	0x6F12, 0x401C,
	0x6F12, 0x80B2,
	0x6F12, 0x1E28,
	0x6F12, 0xF5D3,
	0x6F12, 0x1E20,
	0x6F12, 0x0226,
	0x6F12, 0x1880,
	0x6F12, 0x06EB,
	0x6F12, 0x4006,
	0x6F12, 0x11E0,
	0x6F12, 0x2001,
	0x6F12, 0xF7F4,
	0x6F12, 0x2001,
	0x6F12, 0xD20C,
	0x6F12, 0x2001,
	0x6F12, 0x6A40,
	0x6F12, 0x4000,
	0x6F12, 0xF402,
	0x6F12, 0x2001,
	0x6F12, 0x35A0,
	0x6F12, 0x2000,
	0x6F12, 0x8DD0,
	0x6F12, 0x3780,
	0x6F12, 0x0000,
	0x6F12, 0x4580,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0xD4F8,
	0x6F12,	0xC830,
	0x6F12,	0x02EE,
	0x6F12,	0x101A,
	0x6F12,	0x9E5B,
	0x6F12,	0x33F8,
	0x6F12,	0x1030,
	0x6F12,	0x00EE,
	0x6F12,	0x106A,
	0x6F12,	0xB8EE,
	0x6F12,	0x422A,
	0x6F12,	0xF8EE,
	0x6F12,	0x400A,
	0x6F12,	0x00EE,
	0x6F12,	0x103A,
	0x6F12, 0x02EB,
	0x6F12, 0x4003,
	0x6F12, 0x32F8,
	0x6F12, 0x1000,
	0x6F12, 0x5B88,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0x01EE,
	0x6F12, 0x103A,
	0x6F12, 0xF8EE,
	0x6F12, 0x411A,
	0x6F12, 0x01EE,
	0x6F12, 0x100A,
	0x6F12, 0xB8EE,
	0x6F12, 0x411A,
	0x6F12, 0x01F0,
	0x6F12, 0x4BF9,
	0x6F12, 0xB4F8,
	0x6F12, 0x8800,
	0x6F12, 0x00EE,
	0x6F12, 0x900A,
	0x6F12, 0xF8EE,
	0x6F12, 0x600A,
	0x6F12, 0x20EE,
	0x6F12, 0x200A,
	0x6F12, 0x20EE,
	0x6F12, 0x2A0A,
	0x6F12, 0x88ED,
	0x6F12, 0x890A,
	0x6F12, 0xB9F8,
	0x6F12, 0x9609,
	0x6F12, 0xD4ED,
	0x6F12, 0x210A,
	0x6F12, 0x01EE,
	0x6F12, 0x100A,
	0x6F12, 0xB8EE,
	0x6F12, 0x411A,
	0x6F12, 0x41EE,
	0x6F12, 0x400A,
	0x6F12, 0xC8ED,
	0x6F12, 0x8A0A,
	0x6F12, 0x94F8,
	0x6F12, 0x700A,
	0x6F12, 0x0028,
	0x6F12, 0x7CD0,
	0x6F12, 0xB9F8,
	0x6F12, 0x9609,
	0x6F12, 0x00EE,
	0x6F12, 0x100A,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0xDFED,
	0x6F12, 0xFE2A,
	0x6F12, 0x94ED,
	0x6F12, 0x251A,
	0x6F12, 0x94ED,
	0x6F12, 0x242A,
	0x6F12, 0xF0EE,
	0x6F12, 0x620A,
	0x6F12, 0xF0EE,
	0x6F12, 0x411A,
	0x6F12, 0x00EE,
	0x6F12, 0x821A,
	0x6F12, 0x4FF0,
	0x6F12, 0x8B41,
	0x6F12, 0x11EE,
	0x6F12, 0x100A,
	0x6F12, 0x84ED,
	0x6F12, 0x2A1A,
	0x6F12, 0x8842,
	0x6F12, 0x03DD,
	0x6F12, 0x31EE,
	0x6F12, 0x613A,
	0x6F12, 0xC3EE,
	0x6F12, 0x020A,
	0x6F12, 0xB0EE,
	0x6F12, 0x403A,
	0x6F12, 0x40EE,
	0x6F12, 0x021A,
	0x6F12, 0x11EE,
	0x6F12, 0x100A,
	0x6F12, 0xB0F1,
	0x6F12, 0x8B4F,
	0x6F12, 0x00EE,
	0x6F12, 0xE93A,
	0x6F12, 0x73EE,
	0x6F12, 0x222A,
	0x6F12, 0xC4ED,
	0x6F12, 0x272A,
	0x6F12, 0x89EE,
	0x6F12, 0x223A,
	0x6F12, 0xF0EE,
	0x6F12, 0x402A,
	0x6F12, 0x70EE,
	0x6F12, 0xE20A,
	0x6F12, 0x84ED,
	0x6F12, 0x263A,
	0x6F12, 0xC4ED,
	0x6F12, 0x280A,
	0x6F12, 0xC4ED,
	0x6F12, 0x291A,
	0x6F12, 0x84ED,
	0x6F12, 0x2BBA,
	0x6F12, 0x01DD,
	0x6F12, 0x84ED,
	0x6F12, 0x2ABA,
	0x6F12, 0xF0EE,
	0x6F12, 0x4A0A,
	0x6F12, 0xC4ED,
	0x6F12, 0x2F0A,
	0x6F12, 0x98ED,
	0x6F12, 0x8A1A,
	0x6F12, 0xD8ED,
	0x6F12, 0x891A,
	0x6F12, 0x00EE,
	0x6F12, 0x211A,
	0x6F12, 0x84ED,
	0x6F12, 0x311A,
	0x6F12, 0x98ED,
	0x6F12, 0x8A1A,
	0x6F12, 0x84ED,
	0x6F12, 0x301A,
	0x6F12, 0xB5EE,
	0x6F12, 0xC01A,
	0x6F12, 0xF1EE,
	0x6F12, 0x10FA,
	0x6F12, 0x09D2,
	0x6F12, 0xC4ED,
	0x6F12, 0x300A,
	0x6F12, 0x98ED,
	0x6F12, 0x8A1A,
	0x6F12, 0xD8ED,
	0x6F12, 0x891A,
	0x6F12, 0x30EE,
	0x6F12, 0xC11A,
	0x6F12, 0xC1EE,
	0x6F12, 0x210A,
	0x6F12, 0xB0EE,
	0x6F12, 0x4A1A,
	0x6F12, 0x0026,
	0x6F12, 0x00EE,
	0x6F12, 0xE91A,
	0x6F12, 0x31EE,
	0x6F12, 0x000A,
	0x6F12, 0x84ED,
	0x6F12, 0x2D0A,
	0x6F12, 0x89EE,
	0x6F12, 0x001A,
	0x6F12, 0xB0EE,
	0x6F12, 0x4A0A,
	0x6F12, 0x30EE,
	0x6F12, 0xC00A,
	0x6F12, 0x84ED,
	0x6F12, 0x2C1A,
	0x6F12, 0x84ED,
	0x6F12, 0x2E0A,
	0x6F12, 0x04EB,
	0x6F12, 0x4600,
	0x6F12, 0x04EB,
	0x6F12, 0x8601,
	0x6F12, 0xB0F8,
	0x6F12, 0x5679,
	0x6F12, 0xB9F8,
	0x6F12, 0x9609,
	0x6F12, 0xD1F8,
	0x6F12, 0xD819,
	0x6F12, 0x0191,
	0x6F12, 0x8742,
	0x6F12, 0x44D9,
	0x6F12, 0x00E0,
	0x6F12, 0xDFE0,
	0x6F12, 0xD4F8,
	0x6F12, 0xA410,
	0x6F12, 0xB1F1,
	0x6F12, 0x8B4F,
	0x6F12, 0x02DD,
	0x6F12, 0x4FF4,
	0x6F12, 0x8050,
	0x6F12, 0x77E0,
	0x6F12, 0x00EE,
	0x6F12, 0x100A,
	0x6F12, 0x94ED,
	0x6F12, 0x288A,
	0x6F12, 0x94ED,
	0x6F12, 0x271A,
	0x6F12, 0xF8EE,
	0x6F12, 0x400A,
	0x6F12, 0x00EE,
	0x6F12, 0x107A,
	0x6F12, 0x94ED,
	0x6F12, 0x26DA,
	0x6F12, 0x0BEE,
	0x6F12, 0x901A,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0xD4ED,
	0x6F12, 0x2ACA,
	0x6F12, 0x94ED,
	0x6F12, 0x2BCA,
	0x6F12, 0xB5EE,
	0x6F12, 0xC01A,
	0x6F12, 0x70EE,
	0x6F12, 0xC00A,
	0x6F12, 0x28EE,
	0x6F12, 0x080A,
	0x6F12, 0x01EE,
	0x6F12, 0x600A,
	0x6F12, 0xF1EE,
	0x6F12, 0x10FA,
	0x6F12, 0x04D1,
	0x6F12, 0xF1EE,
	0x6F12, 0x600A,
	0x6F12, 0x80EE,
	0x6F12, 0x880A,
	0x6F12, 0x05E0,
	0x6F12, 0x01F0,
	0x6F12, 0x88F8,
	0x6F12, 0x30EE,
	0x6F12, 0x480A,
	0x6F12, 0x20EE,
	0x6F12, 0x0D0A,
	0x6F12, 0x79EE,
	0x6F12, 0x400A,
	0x6F12, 0x20EE,
	0x6F12, 0xA01A,
	0x6F12, 0x60EE,
	0x6F12, 0xA90A,
	0x6F12, 0x21EE,
	0x6F12, 0x2B1A,
	0x6F12, 0x60EE,
	0x6F12, 0x800A,
	0x6F12, 0x20EE,
	0x6F12, 0x000A,
	0x6F12, 0x00EE,
	0x6F12, 0xAC1A,
	0x6F12, 0x00EE,
	0x6F12, 0x0C1A,
	0x6F12, 0x35E0,
	0x6F12, 0x00EE,
	0x6F12, 0x107A,
	0x6F12, 0x94ED,
	0x6F12, 0x2E8A,
	0x6F12, 0x94ED,
	0x6F12, 0x2D1A,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0x94ED,
	0x6F12, 0x2CDA,
	0x6F12, 0xD4ED,
	0x6F12, 0x2FCA,
	0x6F12, 0x94ED,
	0x6F12, 0x30CA,
	0x6F12, 0xF1EE,
	0x6F12, 0x400A,
	0x6F12, 0x28EE,
	0x6F12, 0x080A,
	0x6F12, 0xD4ED,
	0x6F12, 0x31BA,
	0x6F12, 0xB5EE,
	0x6F12, 0xC01A,
	0x6F12, 0x01EE,
	0x6F12, 0x600A,
	0x6F12, 0xF1EE,
	0x6F12, 0x10FA,
	0x6F12, 0x04D1,
	0x6F12, 0xF1EE,
	0x6F12, 0x600A,
	0x6F12, 0x80EE,
	0x6F12, 0x880A,
	0x6F12, 0x05E0,
	0x6F12, 0x01F0,
	0x6F12, 0x51F8,
	0x6F12, 0x30EE,
	0x6F12, 0x480A,
	0x6F12, 0x20EE,
	0x6F12, 0x0D0A,
	0x6F12, 0x79EE,
	0x6F12, 0x400A,
	0x6F12, 0x20EE,
	0x6F12, 0xA01A,
	0x6F12, 0x60EE,
	0x6F12, 0xA90A,
	0x6F12, 0x21EE,
	0x6F12, 0x2C1A,
	0x6F12, 0x60EE,
	0x6F12, 0x800A,
	0x6F12, 0x20EE,
	0x6F12, 0x000A,
	0x6F12, 0x00EE,
	0x6F12, 0x8C1A,
	0x6F12, 0x00EE,
	0x6F12, 0x2B1A,
	0x6F12, 0x31EE,
	0x6F12, 0x280A,
	0x6F12, 0xBCEE,
	0x6F12, 0xC00A,
	0x6F12, 0x10EE,
	0x6F12, 0x100A,
	0x6F12, 0x80B2,
	0x6F12, 0xB4F8,
	0x6F12, 0xD038,
	0x6F12, 0x0199,
	0x6F12, 0x1B02,
	0x6F12, 0x00FB,
	0x6F12, 0x0310,
	0x6F12, 0x000C,
	0x6F12, 0x0003,
	0x6F12, 0x00EB,
	0x6F12, 0x5700,
	0x6F12, 0xB0FB,
	0x6F12, 0xF7F0,
	0x6F12, 0xB0F5,
	0x6F12, 0x803F,
	0x6F12, 0x01D3,
	0x6F12, 0x4FF6,
	0x6F12, 0xFF70,
	0x6F12, 0x7B4B,
	0x6F12, 0x80B2,
	0x6F12, 0xB3F8,
	0x6F12, 0x6A10,
	0x6F12, 0xB942,
	0x6F12, 0x28D9,
	0x6F12, 0xCF1B,
	0x6F12, 0x00EE,
	0x6F12, 0x107A,
	0x6F12, 0xB3F8,
	0x6F12, 0x6C30,
	0x6F12, 0xF8EE,
	0x6F12, 0x400A,
	0x6F12, 0x00EE,
	0x6F12, 0x101A,
	0x6F12, 0x1B03,
	0x6F12, 0xB3FB,
	0x6F12, 0xF1F3,
	0x6F12, 0xB8EE,
	0x6F12, 0x401A,
	0x6F12, 0x9BB2,
	0x6F12, 0x80EE,
	0x6F12, 0x810A,
	0x6F12, 0x00EE,
	0x6F12, 0x903A,
	0x6F12, 0xF8EE,
	0x6F12, 0x600A,
	0x6F12, 0x60EE,
	0x6F12, 0x800A,
	0x6F12, 0x39EE,
	0x6F12, 0x401A,
	0x6F12, 0x00EE,
	0x6F12, 0x100A,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0x40EE,
	0x6F12, 0x010A,
	0x6F12, 0x30EE,
	0x6F12, 0xA80A,
	0x6F12, 0xBCEE,
	0x6F12, 0xC00A,
	0x6F12, 0x10EE,
	0x6F12, 0x101A,
	0x6F12, 0x89B2,
	0x6F12, 0x8142,
	0x6F12, 0x00D2,
	0x6F12, 0x0846,
	0x6F12, 0x9BF8,
	0x6F12, 0x0310,
	0x6F12, 0x81B9,
	0x6F12, 0x00EE,
	0x6F12, 0x100A,
	0x6F12, 0x0F99,
	0x6F12, 0xB8EE,
	0x6F12, 0x401A,
	0x6F12, 0xD1ED,
	0x6F12, 0x060A,
	0x6F12, 0xB0EE,
	0x6F12, 0x680A,
	0x6F12, 0x01EE,
	0x6F12, 0x200A,
	0x6F12, 0xBDEE,
	0x6F12, 0xC00A,
	0x6F12, 0x10EE,
	0x6F12, 0x100A,
	0x6F12, 0xC0F3,
	0x6F12, 0xCF00,
	0x6F12, 0xB4F8,
	0x6F12, 0xD218,
	0x6F12, 0x8142,
	0x6F12, 0x00D9,
	0x6F12, 0x0846,
	0x6F12, 0x761C,
	0x6F12, 0x25F8,
	0x6F12, 0x020B,
	0x6F12, 0x202E,
	0x6F12, 0xFFF6,
	0x6F12, 0x12AF,
	0x6F12, 0x77E0,
	0x6F12, 0x534B,
	0x6F12, 0x0020,
	0x6F12, 0x4FF4,
	0x6F12, 0x803C,
	0x6F12, 0x04EB,
	0x6F12, 0x4001,
	0x6F12, 0xD4ED,
	0x6F12, 0x250A,
	0x6F12, 0xB1F8,
	0x6F12, 0x5619,
	0x6F12, 0x94ED,
	0x6F12, 0x241A,
	0x6F12, 0x00EE,
	0x6F12, 0x101A,
	0x6F12, 0x04EB,
	0x6F12, 0x8002,
	0x6F12, 0xB4F8,
	0x6F12, 0xD078,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0xD2F8,
	0x6F12, 0xD829,
	0x6F12, 0x3F02,
	0x6F12, 0x40EE,
	0x6F12, 0x010A,
	0x6F12, 0x30EE,
	0x6F12, 0xA80A,
	0x6F12, 0xBCEE,
	0x6F12, 0xC00A,
	0x6F12, 0x10EE,
	0x6F12, 0x106A,
	0x6F12, 0xB6B2,
	0x6F12, 0x06FB,
	0x6F12, 0x0722,
	0x6F12, 0x120C,
	0x6F12, 0x1203,
	0x6F12, 0x02EB,
	0x6F12, 0x5102,
	0x6F12, 0xB2FB,
	0x6F12, 0xF1F2,
	0x6F12, 0x6245,
	0x6F12, 0x01D3,
	0x6F12, 0x4FF6,
	0x6F12, 0xFF72,
	0x6F12, 0xB3F8,
	0x6F12, 0x6A60,
	0x6F12, 0x92B2,
	0x6F12, 0x8E42,
	0x6F12, 0x28D9,
	0x6F12, 0x711A,
	0x6F12, 0x00EE,
	0x6F12, 0x101A,
	0x6F12, 0xB3F8,
	0x6F12, 0x6C70,
	0x6F12, 0xF8EE,
	0x6F12, 0x400A,
	0x6F12, 0x00EE,
	0x6F12, 0x106A,
	0x6F12, 0x3F03,
	0x6F12, 0xB7FB,
	0x6F12, 0xF6F7,
	0x6F12, 0xB8EE,
	0x6F12, 0x401A,
	0x6F12, 0xBFB2,
	0x6F12, 0x80EE,
	0x6F12, 0x810A,
	0x6F12, 0x00EE,
	0x6F12, 0x907A,
	0x6F12, 0xF8EE,
	0x6F12, 0x600A,
	0x6F12, 0x60EE,
	0x6F12, 0x800A,
	0x6F12, 0x39EE,
	0x6F12, 0x401A,
	0x6F12, 0x00EE,
	0x6F12, 0x102A,
	0x6F12, 0xB8EE,
	0x6F12, 0x400A,
	0x6F12, 0x40EE,
	0x6F12, 0x010A,
	0x6F12, 0x30EE,
	0x6F12, 0xA80A,
	0x6F12, 0xBCEE,
	0x6F12, 0xC00A,
	0x6F12, 0x10EE,
	0x6F12, 0x101A,
	0x6F12, 0x89B2,
	0x6F12, 0x9142,
	0x6F12, 0x00D2,
	0x6F12, 0x0A46,
	0x6F12, 0x9BF8,
	0x6F12, 0x0310,
	0x6F12, 0x81B9,
	0x6F12, 0x00EE,
	0x6F12, 0x102A,
	0x6F12, 0x0F99,
	0x6F12, 0xB8EE,
	0x6F12, 0x401A,
	0x6F12, 0xD1ED,
	0x6F12, 0x060A,
	0x6F12, 0xB0EE,
	0x6F12, 0x680A,
	0x6F12, 0x01EE,
	0x6F12, 0x200A,
	0x6F12, 0xBDEE,
	0x6F12, 0xC00A,
	0x6F12, 0x10EE,
	0x6F12, 0x101A,
	0x6F12, 0xC1F3,
	0x6F12, 0xCF02,
	0x6F12, 0xB4F8,
	0x6F12, 0xD218,
	0x6F12, 0x9142,
	0x6F12, 0x00D9,
	0x6F12, 0x0A46,
	0x6F12, 0x401C,
	0x6F12, 0x25F8,
	0x6F12, 0x022B,
	0x6F12, 0x2028,
	0x6F12, 0x8BDB,
	0x6F12, 0x0AF1,
	0x6F12, 0x010A,
	0x6F12, 0xBAF1,
	0x6F12, 0x200F,
	0x6F12, 0xFFF6,
	0x6F12, 0x1AAD,
	0x6F12, 0x02B0,
	0x6F12, 0xBDEC,
	0x6F12, 0x0C8B,
	0x6F12, 0xBDE8,
	0x6F12, 0xFE8F,
	0x6F12, 0x4878,
	0x6F12, 0x02F1,
	0x6F12, 0x8042,
	0x6F12, 0x0302,
	0x6F12, 0x0878,
	0x6F12, 0x1843,
	0x6F12, 0x1080,
	0x6F12, 0x7047,
	0x6F12, 0x0F4B,
	0x6F12, 0x20F0,
	0x6F12, 0x0100,
	0x6F12, 0x1844,
	0x6F12, 0x00EB,
	0x6F12, 0x8100,
	0x6F12, 0x00EB,
	0x6F12, 0x8210,
	0x6F12, 0x7047,
	0x6F12, 0xF0B5,
	0x6F12, 0x1646,
	0x6F12, 0x8446,
	0x6F12, 0x0F46,
	0x6F12, 0x0A46,
	0x6F12, 0x1D46,
	0x6F12, 0x0024,
	0x6F12, 0x3146,
	0x6F12, 0x1846,
	0x6F12, 0xFFF7,
	0x6F12, 0xECFF,
	0x6F12, 0x064B,
	0x6F12, 0x0146,
	0x6F12, 0x06F0,
	0x6F12, 0x0300,
	0x6F12, 0xDA78,
	0x6F12, 0xDB8B,
	0x6F12, 0x07E0,
	0x6F12, 0x457F,
	0x6F12, 0xF000,
	0x6F12, 0x2000,
	0x6F12, 0x8DD0,
	0x6F12, 0x0001,
	0x6F12, 0x3324,
	0x6F12, 0x2001,
	0x6F12, 0xD20C,
	0x6F12, 0x0BB3,
	0x6F12, 0x15B1,
	0x6F12, 0x012D,
	0x6F12, 0x0ED0,
	0x6F12, 0x27E0,
	0x6F12, 0x30B3,
	0x6F12, 0x0128,
	0x6F12, 0x04D0,
	0x6F12, 0x0228,
	0x6F12, 0x04D0,
	0x6F12, 0x0328,
	0x6F12, 0x04D0,
	0x6F12, 0x1FE0,
	0x6F12, 0x0224,
	0x6F12, 0x1DE0,
	0x6F12, 0x0124,
	0x6F12, 0x1BE0,
	0x6F12, 0x0324,
	0x6F12, 0x19E0,
	0x6F12, 0x30B1,
	0x6F12, 0x0128,
	0x6F12, 0x06D0,
	0x6F12, 0x0228,
	0x6F12, 0x06D0,
	0x6F12, 0x0328,
	0x6F12, 0x06D0,
	0x6F12, 0x11E0,
	0x6F12, 0x0624,
	0x6F12, 0x0FE0,
	0x6F12, 0x0424,
	0x6F12, 0x0DE0,
	0x6F12, 0x0724,
	0x6F12, 0x0BE0,
	0x6F12, 0x0524,
	0x6F12, 0x09E0,
	0x6F12, 0xDCF8,
	0x6F12, 0x3C00,
	0x6F12, 0x00EB,
	0x6F12, 0x0220,
	0x6F12, 0xBA01,
	0x6F12, 0x02EB,
	0x6F12, 0x8602,
	0x6F12, 0x1044,
	0x6F12, 0x2844,
	0x6F12, 0xC47F,
	0x6F12, 0xE807,
	0x6F12, 0x00D0,
	0x6F12, 0x0820,
	0x6F12, 0x01F1,
	0x6F12, 0x8041,
	0x6F12, 0x8440,
	0x6F12, 0x0888,
	0x6F12, 0x2043,
	0x6F12, 0x0880,
	0x6F12, 0xF0BD,
	0x6F12, 0x10B5,
	0x6F12, 0x491E,
	0x6F12, 0x0298,
	0x6F12, 0x5943,
	0x6F12, 0x30F8,
	0x6F12, 0x1240,
	0x6F12, 0xFD48,
	0x6F12, 0x00EB,
	0x6F12, 0x4212,
	0x6F12, 0x88B2,
	0x6F12, 0x02EB,
	0x6F12, 0x4001,
	0x6F12, 0xC218,
	0x6F12, 0x92B2,
	0x6F12, 0x05E0,
	0x6F12, 0x4FF0,
	0x6F12, 0x8043,
	0x6F12, 0x5C52,
	0x6F12, 0x891C,
	0x6F12, 0x401C,
	0x6F12, 0x80B2,
	0x6F12, 0x9042,
	0x6F12, 0xF7D3,
	0x6F12, 0x10BD,
	0x6F12, 0x2DE9,
	0x6F12, 0xF841,
	0x6F12, 0x8046,
	0x6F12, 0xF348,
	0x6F12, 0x0F46,
	0x6F12, 0x096C,
	0x6F12, 0xC078,
	0x6F12, 0x1546,
	0x6F12, 0x0830,
	0x6F12, 0x0024,
	0x6F12, 0x11F8,
	0x6F12, 0x00C0,
	0x6F12, 0x2646,
	0x6F12, 0xA2B2,
	0x6F12, 0x6346,
	0x6F12, 0x4146,
	0x6F12, 0x3846,
	0x6F12, 0x0095,
	0x6F12, 0xFFF7,
	0x6F12, 0xD4FF,
	0x6F12, 0x25F8,
	0x6F12, 0x1460,
	0x6F12, 0x641C,
	0x6F12, 0x042C,
	0x6F12, 0xF3DB,
	0x6F12, 0xBDE8,
	0x6F12, 0xF881,
	0x6F12, 0x30B5,
	0x6F12, 0x0022,
	0x6F12, 0x0828,
	0x6F12, 0x02D3,
	0x6F12, 0x0838,
	0x6F12, 0x80B2,
	0x6F12, 0x0122,
	0x6F12, 0x4300,
	0x6F12, 0x0320,
	0x6F12, 0xE34D,
	0x6F12, 0x9840,
	0x6F12, 0x84B2,
	0x6F12, 0xE878,
	0x6F12, 0x2D78,
	0x6F12, 0x05B1,
	0x6F12, 0x0020,
	0x6F12, 0x096C,
	0x6F12, 0x01EB,
	0x6F12, 0x8000,
	0x6F12, 0x7221,
	0x6F12, 0x01EB,
	0x6F12, 0x4201,
	0x6F12, 0x405A,
	0x6F12, 0x2040,
	0x6F12, 0xD840,
	0x6F12, 0x30BD,
	0x6F12, 0xF0B5,
	0x6F12, 0xDA4C,
	0x6F12, 0x069D,
	0x6F12, 0x2678,
	0x6F12, 0x3EB1,
	0x6F12, 0x04EB,
	0x6F12, 0xC100,
	0x6F12, 0x00EB,
	0x6F12, 0x4200,
	0x6F12, 0x017A,
	0x6F12, 0x1970,
	0x6F12, 0x407A,
	0x6F12, 0x0FE0,
	0x6F12, 0xE778,
	0x6F12, 0x066C,
	0x6F12, 0xC900,
	0x6F12, 0x06EB,
	0x6F12, 0x4716,
	0x6F12, 0x01EB,
	0x6F12, 0x4201,
	0x6F12, 0x7218,
	0x6F12, 0x527C,
	0x6F12, 0x1A70,
	0x6F12, 0x006C,
	0x6F12, 0xE278,
	0x6F12, 0x00EB,
	0x6F12, 0x4210,
	0x6F12, 0x0844,
	0x6F12, 0x807C,
	0x6F12, 0x5870,
	0x6F12, 0x1878,
	0x6F12, 0x8009,
	0x6F12, 0x2880,
	0x6F12, 0x1878,
	0x6F12, 0x20F0,
	0x6F12, 0xC000,
	0x6F12, 0x1870,
	0x6F12, 0xF0BD,
	0x6F12, 0x2DE9,
	0x6F12, 0xF04F,
	0x6F12, 0x87B0,
	0x6F12, 0x8B46,
	0x6F12, 0xDDF8,
	0x6F12, 0x4080,
	0x6F12, 0x0446,
	0x6F12, 0x1746,
	0x6F12, 0x9946,
	0x6F12, 0x4146,
	0x6F12, 0x05A8,
	0x6F12, 0x00F0,
	0x6F12, 0x76FE,
	0x6F12, 0x0026,
	0x6F12, 0xADF8,
	0x6F12, 0x0860,
	0x6F12, 0xADF8,
	0x6F12, 0x0C60,
	0x6F12, 0x4146,
	0x6F12, 0x5846,
	0x6F12, 0xFFF7,
	0x6F12, 0xAAFF,
	0x6F12, 0x8246,
	0x6F12, 0x0025,
	0x6F12, 0x21E0,
	0x6F12, 0x02A9,
	0x6F12, 0x03A8,
	0x6F12, 0xCDE9,
	0x6F12, 0x0001,
	0x6F12, 0x04AB,
	0x6F12, 0x2A46,
	0x6F12, 0x5146,
	0x6F12, 0x4046,
	0x6F12, 0xFFF7,
	0x6F12, 0xB7FF,
	0x6F12, 0xBDF8,
	0x6F12, 0x0800,
	0x6F12, 0x8742,
	0x6F12, 0x11D1,
	0x6F12, 0x9DF8,
	0x6F12, 0x1100,
	0x6F12, 0x3346,
	0x6F12, 0x0102,
	0x6F12, 0x9DF8,
	0x6F12, 0x1000,
	0x6F12, 0x5A46,
	0x6F12, 0x0843,
	0x6F12, 0x4FF0,
	0x6F12, 0x8041,
	0x6F12, 0x0853,
	0x6F12, 0x3946,
	0x6F12, 0x4046,
	0x6F12, 0xFFF7,
	0x6F12, 0x06FF,
	0x6F12, 0x761C,
	0x6F12, 0xB6B2,
	0x6F12, 0xA41C,
	0x6F12, 0x6D1C,
	0x6F12, 0xADB2,
	0x6F12, 0xD8F8,
	0x6F12, 0x4000,
	0x6F12, 0x4078,
	0x6F12, 0xA842,
	0x6F12, 0xD8D8,
	0x6F12, 0x39F8,
	0x6F12, 0x1700,
	0x6F12, 0x3044,
	0x6F12, 0x29F8,
	0x6F12, 0x1700,
	0x6F12, 0x07B0,
	0x6F12, 0xBDE8,
	0x6F12, 0xF08F,
	0x6F12, 0x2DE9,
	0x6F12, 0xF843,
	0x6F12, 0x1E46,
	0x6F12, 0x1746,
	0x6F12, 0x8846,
	0x6F12, 0x0546,
	0x6F12, 0x0024,
	0x6F12, 0xA2B2,
	0x6F12, 0x3B46,
	0x6F12, 0x4146,
	0x6F12, 0x2846,
	0x6F12, 0x0096,
	0x6F12, 0xFFF7,
	0x6F12, 0xAAFF,
	0x6F12, 0x0835,
	0x6F12, 0x641C,
	0x6F12, 0x042C,
	0x6F12, 0xF4D3,
	0x6F12, 0xBDE8,
	0x6F12, 0xF883,
	0x6F12, 0x2DE9,
	0x6F12, 0xFC47,
	0x6F12, 0x0746,
	0x6F12, 0x9848,
	0x6F12, 0x0022,
	0x6F12, 0x4C38,
	0x6F12, 0x4069,
	0x6F12, 0x85B2,
	0x6F12, 0x040C,
	0x6F12, 0x2946,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0xFCFD,
	0x6F12, 0x3846,
	0x6F12, 0x00F0,
	0x6F12, 0x1CFE,
	0x6F12, 0x0122,
	0x6F12, 0x2946,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0xF4FD,
	0x6F12, 0x9049,
	0x6F12, 0x9220,
	0x6F12, 0x0880,
	0x6F12, 0x8F49,
	0x6F12, 0x0420,
	0x6F12, 0xA1F8,
	0x6F12, 0x0201,
	0x6F12, 0x3878,
	0x6F12, 0x0028,
	0x6F12, 0x3DD1,
	0x6F12, 0xF86B,
	0x6F12, 0x4078,
	0x6F12, 0x0228,
	0x6F12, 0x39D0,
	0x6F12, 0x8B4E,
	0x6F12, 0x3046,
	0x6F12, 0x00F0,
	0x6F12, 0x0AFE,
	0x6F12, 0x8A48,
	0x6F12, 0x00F0,
	0x6F12, 0x0CFE,
	0x6F12, 0x844A,
	0x6F12, 0x1078,
	0x6F12, 0x40B9,
	0x6F12, 0xD078,
	0x6F12, 0x396C,
	0x6F12, 0x0144,
	0x6F12, 0x097A,
	0x6F12, 0x1183,
	0x6F12, 0x396C,
	0x6F12, 0x0844,
	0x6F12, 0xC07A,
	0x6F12, 0x5083,
	0x6F12, 0x108B,
	0x6F12, 0x518B,
	0x6F12, 0x0125,
	0x6F12, 0x4843,
	0x6F12, 0x0021,
	0x6F12, 0x80B2,
	0x6F12, 0x0091,
	0x6F12, 0x0191,
	0x6F12, 0x1028,
	0x6F12, 0x00D9,
	0x6F12, 0x1020,
	0x6F12, 0x8046,
	0x6F12, 0x0024,
	0x6F12, 0x9146,
	0x6F12, 0x15E0,
	0x6F12, 0x3B46,
	0x6F12, 0x6A46,
	0x6F12, 0x2146,
	0x6F12, 0x3046,
	0x6F12, 0xFFF7,
	0x6F12, 0xA1FF,
	0x6F12, 0xB9F8,
	0x6F12, 0x1800,
	0x6F12, 0x2036,
	0x6F12, 0x6843,
	0x6F12, 0x401E,
	0x6F12, 0xA042,
	0x6F12, 0x06DC,
	0x6F12, 0x6A46,
	0x6F12, 0x3946,
	0x6F12, 0x2846,
	0x6F12, 0xFFF7,
	0x6F12, 0xF2FE,
	0x6F12, 0x6D1C,
	0x6F12, 0xADB2,
	0x6F12, 0x641C,
	0x6F12, 0xA4B2,
	0x6F12, 0x4445,
	0x6F12, 0xE7D3,
	0x6F12, 0xBDE8,
	0x6F12, 0xFC87,
	0x6F12, 0x2DE9,
	0x6F12, 0xFC41,
	0x6F12, 0x0746,
	0x6F12, 0x0878,
	0x6F12, 0x1C46,
	0x6F12, 0x1546,
	0x6F12, 0x0E46,
	0x6F12, 0x38B9,
	0x6F12, 0x00F0,
	0x6F12, 0xD2FD,
	0x6F12, 0x20B1,
	0x6F12, 0x6948,
	0x6F12, 0x0078,
	0x6F12, 0x08B1,
	0x6F12, 0x3878,
	0x6F12, 0x00B1,
	0x6F12, 0x0120,
	0x6F12, 0x2070,
	0x6F12, 0x0028,
	0x6F12, 0x2ED1,
	0x6F12, 0xC4E9,
	0x6F12, 0x0F67,
	0x6F12, 0xADF8,
	0x6F12, 0x0400,
	0x6F12, 0xADF8,
	0x6F12, 0x0600,
	0x6F12, 0x00F0,
	0x6F12, 0xC5FD,
	0x6F12, 0xADF8,
	0x6F12, 0x0000,
	0x6F12, 0x00F0,
	0x6F12, 0xC6FD,
	0x6F12, 0xADF8,
	0x6F12, 0x0200,
	0x6F12, 0x2146,
	0x6F12, 0x6846,
	0x6F12, 0x00F0,
	0x6F12, 0xC5FD,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0xC7FD,
	0x6F12, 0xE088,
	0x6F12, 0xBDF8,
	0x6F12, 0x0010,
	0x6F12, 0xC840,
	0x6F12, 0xE080,
	0x6F12, 0x2189,
	0x6F12, 0xBDF8,
	0x6F12, 0x0220,
	0x6F12, 0xD140,
	0x6F12, 0x2181,
	0x6F12, 0x5049,
	0x6F12, 0x4A78,
	0x6F12, 0xE281,
	0x6F12, 0x8978,
	0x6F12, 0x2182,
	0x6F12, 0xBDF8,
	0x6F12, 0x0020,
	0x6F12, 0x2021,
	0x6F12, 0xD140,
	0x6F12, 0xB0FB,
	0x6F12, 0xF1F0,
	0x6F12, 0x6082,
	0x6F12, 0x2878,
	0x6F12, 0x2076,
	0x6F12, 0x6878,
	0x6F12, 0x6076,
	0x6F12, 0xBDE8,
	0x6F12, 0xFC81,
	0x6F12, 0x2DE9,
	0x6F12, 0xFF4F,
	0x6F12, 0x4648,
	0x6F12, 0x83B0,
	0x6F12, 0x4C38,
	0x6F12, 0x0C46,
	0x6F12, 0xC069,
	0x6F12, 0xDDE9,
	0x6F12, 0x1065,
	0x6F12, 0x4FEA,
	0x6F12, 0x1048,
	0x6F12, 0x80B2,
	0x6F12, 0x1746,
	0x6F12, 0x8146,
	0x6F12, 0x0146,
	0x6F12, 0x9B46,
	0x6F12, 0xDDF8,
	0x6F12, 0x48A0,
	0x6F12, 0x0022,
	0x6F12, 0x4046,
	0x6F12, 0x00F0,
	0x6F12, 0x4FFD,
	0x6F12, 0xCDE9,
	0x6F12, 0x0065,
	0x6F12, 0x5B46,
	0x6F12, 0x3A46,
	0x6F12, 0x2146,
	0x6F12, 0xCDF8,
	0x6F12, 0x08A0,
	0x6F12, 0x0398,
	0x6F12, 0x00F0,
	0x6F12, 0x90FD,
	0x6F12, 0x3878,
	0x6F12, 0x28B1,
	0x6F12, 0x3879,
	0x6F12, 0x18B1,
	0x6F12, 0x3B48,
	0x6F12, 0x90F8,
	0x6F12, 0xA406,
	0x6F12, 0xA8B1,
	0x6F12, 0x0020,
	0x6F12, 0x6081,
	0x6F12, 0x10B1,
	0x6F12, 0xE680,
	0x6F12, 0x2581,
	0x6F12, 0xA582,
	0x6F12, 0xA089,
	0x6F12, 0xE188,
	0x6F12, 0x0122,
	0x6F12, 0x0844,
	0x6F12, 0xA081,
	0x6F12, 0xE089,
	0x6F12, 0x2189,
	0x6F12, 0x0844,
	0x6F12, 0xE081,
	0x6F12, 0x07B0,
	0x6F12, 0x4946,
	0x6F12, 0x4046,
	0x6F12, 0xBDE8,
	0x6F12, 0xF04F,
	0x6F12, 0x00F0,
	0x6F12, 0x27BD,
	0x6F12, 0x0120,
	0x6F12, 0xE8E7,
	0x6F12, 0x2E49,
	0x6F12, 0x0122,
	0x6F12, 0x91F8,
	0x6F12, 0xCF10,
	0x6F12, 0x8A40,
	0x6F12, 0x1044,
	0x6F12, 0x401E,
	0x6F12, 0xC840,
	0x6F12, 0x7047,
	0x6F12, 0x70B5,
	0x6F12, 0x2248,
	0x6F12, 0x0022,
	0x6F12, 0x4C38,
	0x6F12, 0x416A,
	0x6F12, 0x0C0C,
	0x6F12, 0x8DB2,
	0x6F12, 0x2946,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0x11FD,
	0x6F12, 0x00F0,
	0x6F12, 0x5FFD,
	0x6F12, 0x2448,
	0x6F12, 0x0088,
	0x6F12, 0x18B1,
	0x6F12, 0x2448,
	0x6F12, 0xB0F8,
	0x6F12, 0x2001,
	0x6F12, 0x50B1,
	0x6F12, 0x1C21,
	0x6F12, 0x0320,
	0x6F12, 0x00F0,
	0x6F12, 0x59FD,
	0x6F12, 0x2946,
	0x6F12, 0x2046,
	0x6F12, 0xBDE8,
	0x6F12, 0x7040,
	0x6F12, 0x0122,
	0x6F12, 0x00F0,
	0x6F12, 0xFDBC,
	0x6F12, 0x0821,
	0x6F12, 0xF3E7,
	0x6F12, 0x1C48,
	0x6F12, 0x0121,
	0x6F12, 0x0A46,
	0x6F12, 0x80F8,
	0x6F12, 0xC412,
	0x6F12, 0x0903,
	0x6F12, 0x1A48,
	0x6F12, 0x00F0,
	0x6F12, 0xF2BC,
	0x6F12, 0x2DE9,
	0x6F12, 0xF041,
	0x6F12, 0x0446,
	0x6F12, 0x0C48,
	0x6F12, 0x1546,
	0x6F12, 0x4C38,
	0x6F12, 0x8846,
	0x6F12, 0x806A,
	0x6F12, 0x0022,
	0x6F12, 0x87B2,
	0x6F12, 0x060C,
	0x6F12, 0x3946,
	0x6F12, 0x3046,
	0x6F12, 0x00F0,
	0x6F12, 0xE3FC,
	0x6F12, 0x2A46,
	0x6F12, 0x4146,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0x38FD,
	0x6F12, 0x94F8,
	0x6F12, 0x2400,
	0x6F12, 0x10F0,
	0x6F12, 0x0F0F,
	0x6F12, 0x24D1,
	0x6F12, 0x0D48,
	0x6F12, 0x1BE0,
	0x6F12, 0x0001,
	0x6F12, 0x344C,
	0x6F12, 0x2001,
	0x6F12, 0xD20C,
	0x6F12, 0x4001,
	0x6F12, 0x34CE,
	0x6F12, 0x4001,
	0x6F12, 0x3000,
	0x6F12, 0x0001,
	0x6F12, 0x311C,
	0x6F12, 0x0001,
	0x6F12, 0x3324,
	0x6F12, 0x2001,
	0x6F12, 0x95C2,
	0x6F12, 0x2001,
	0x6F12, 0x7140,
	0x6F12, 0x2001,
	0x6F12, 0x6A40,
	0x6F12, 0x2001,
	0x6F12, 0x4110,
	0x6F12, 0x2000,
	0x6F12, 0x1300,
	0x6F12, 0x2000,
	0x6F12, 0xD050,
	0x6F12, 0x0001,
	0x6F12, 0xDF10,
	0x6F12, 0x2001,
	0x6F12, 0x35A0,
	0x6F12, 0x90F8,
	0x6F12, 0xD200,
	0x6F12, 0x18B9,
	0x6F12, 0xE068,
	0x6F12, 0xA842,
	0x6F12, 0x00D9,
	0x6F12, 0xE560,
	0x6F12, 0x3946,
	0x6F12, 0x3046,
	0x6F12, 0xBDE8,
	0x6F12, 0xF041,
	0x6F12, 0x0122,
	0x6F12, 0x00F0,
	0x6F12, 0xADBC,
	0x6F12, 0x2DE9,
	0x6F12, 0xF047,
	0x6F12, 0x1F46,
	0x6F12, 0x1546,
	0x6F12, 0x0E46,
	0x6F12, 0x0446,
	0x6F12, 0xFE48,
	0x6F12, 0x0022,
	0x6F12, 0xC06A,
	0x6F12, 0x4FEA,
	0x6F12, 0x104A,
	0x6F12, 0x80B2,
	0x6F12, 0x8146,
	0x6F12, 0x0146,
	0x6F12, 0x5046,
	0x6F12, 0x00F0,
	0x6F12, 0x9CFC,
	0x6F12, 0x3B46,
	0x6F12, 0x2A46,
	0x6F12, 0x3146,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0xF5FC,
	0x6F12, 0xDFF8,
	0x6F12, 0xD883,
	0x6F12, 0x08F1,
	0x6F12, 0x4C08,
	0x6F12, 0x98F8,
	0x6F12, 0x9E00,
	0x6F12, 0x70B3,
	0x6F12, 0xF348,
	0x6F12, 0x90F8,
	0x6F12, 0xCF00,
	0x6F12, 0x0128,
	0x6F12, 0x2DD1,
	0x6F12, 0x94F8,
	0x6F12, 0x2000,
	0x6F12, 0x30BB,
	0x6F12, 0xF04E,
	0x6F12, 0x1120,
	0x6F12, 0x96F8,
	0x6F12, 0xB010,
	0x6F12, 0x8843,
	0x6F12, 0x15D0,
	0x6F12, 0x0020,
	0x6F12, 0xFF08,
	0x6F12, 0xE8B1,
	0x6F12, 0x00F0,
	0x6F12, 0xE0FC,
	0x6F12, 0x2269,
	0x6F12, 0xD8F8,
	0x6F12, 0xA010,
	0x6F12, 0x05FB,
	0x6F12, 0x0070,
	0x6F12, 0x5318,
	0x6F12, 0x2361,
	0x6F12, 0x96F8,
	0x6F12, 0xB010,
	0x6F12, 0xC907,
	0x6F12, 0x07D0,
	0x6F12, 0x96F8,
	0x6F12, 0xB110,
	0x6F12, 0xA942,
	0x6F12, 0x03D8,
	0x6F12, 0x0121,
	0x6F12, 0x02E0,
	0x6F12, 0x0120,
	0x6F12, 0xE8E7,
	0x6F12, 0x0021,
	0x6F12, 0x39B1,
	0x6F12, 0x050D,
	0x6F12, 0x0103,
	0x6F12, 0x0022,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0xCAFC,
	0x6F12, 0x02E0,
	0x6F12, 0x02E0,
	0x6F12, 0x4FF4,
	0x6F12, 0x8051,
	0x6F12, 0x6161,
	0x6F12, 0x4946,
	0x6F12, 0x5046,
	0x6F12, 0xBDE8,
	0x6F12, 0xF047,
	0x6F12, 0x0122,
	0x6F12, 0x00F0,
	0x6F12, 0x55BC,
	0x6F12, 0x2DE9,
	0x6F12, 0xF041,
	0x6F12, 0xD74C,
	0x6F12, 0x0027,
	0x6F12, 0x2088,
	0x6F12, 0x10B1,
	0x6F12, 0xE078,
	0x6F12, 0x0128,
	0x6F12, 0x0FD0,
	0x6F12, 0xD548,
	0x6F12, 0x80F8,
	0x6F12, 0xF875,
	0x6F12, 0x00F0,
	0x6F12, 0xB5FC,
	0x6F12, 0x0028,
	0x6F12, 0x71D0,
	0x6F12, 0xD248,
	0x6F12, 0x0078,
	0x6F12, 0x0028,
	0x6F12, 0x6DD0,
	0x6F12, 0xBDE8,
	0x6F12, 0xF041,
	0x6F12, 0x0120,
	0x6F12, 0x00F0,
	0x6F12, 0xAFBC,
	0x6F12, 0x0020,
	0x6F12, 0x00F0,
	0x6F12, 0xB1FC,
	0x6F12, 0x00B1,
	0x6F12, 0x0220,
	0x6F12, 0xCA49,
	0x6F12, 0x81F8,
	0x6F12, 0x6D09,
	0x6F12, 0xA08B,
	0x6F12, 0x4FF4,
	0x6F12, 0x7A71,
	0x6F12, 0x4843,
	0x6F12, 0xC749,
	0x6F12, 0xC1F8,
	0x6F12, 0x1C06,
	0x6F12, 0x0846,
	0x6F12, 0x618B,
	0x6F12, 0xD0F8,
	0x6F12, 0x3406,
	0x6F12, 0x401A,
	0x6F12, 0x0028,
	0x6F12, 0x00DC,
	0x6F12, 0x0020,
	0x6F12, 0xC14E,
	0x6F12, 0xB6F8,
	0x6F12, 0xA213,
	0x6F12, 0xF26B,
	0x6F12, 0x00F0,
	0x6F12, 0x9CFC,
	0x6F12, 0x0446,
	0x6F12, 0x3046,
	0x6F12, 0xD0F8,
	0x6F12, 0x4055,
	0x6F12, 0xD0F8,
	0x6F12, 0x2805,
	0x6F12, 0x8542,
	0x6F12, 0x00D8,
	0x6F12, 0x0546,
	0x6F12, 0x2146,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0x94FC,
	0x6F12, 0x00F0,
	0x6F12, 0x97FC,
	0x6F12, 0x0146,
	0x6F12, 0xB648,
	0x6F12, 0xD0F8,
	0x6F12, 0x1C06,
	0x6F12, 0x00F0,
	0x6F12, 0x96FC,
	0x6F12, 0xB449,
	0x6F12, 0xC1F8,
	0x6F12, 0x1406,
	0x6F12, 0x0846,
	0x6F12, 0xD0F8,
	0x6F12, 0x1806,
	0x6F12, 0xA042,
	0x6F12, 0x2BD8,
	0x6F12, 0xB6F8,
	0x6F12, 0xA213,
	0x6F12, 0x2846,
	0x6F12, 0xF26B,
	0x6F12, 0x00F0,
	0x6F12, 0x79FC,
	0x6F12, 0xAD49,
	0x6F12, 0x201A,
	0x6F12, 0xD1F8,
	0x6F12, 0xF415,
	0x6F12, 0x401A,
	0x6F12, 0xAA49,
	0x6F12, 0xC1F8,
	0x6F12, 0x1006,
	0x6F12, 0xAB48,
	0x6F12, 0x0488,
	0x6F12, 0x00F0,
	0x6F12, 0x81FC,
	0x6F12, 0x18B1,
	0x6F12, 0xA648,
	0x6F12, 0x90F8,
	0x6F12, 0x7407,
	0x6F12, 0x28B9,
	0x6F12, 0xB4F5,
	0x6F12, 0x807F,
	0x6F12, 0x02D0,
	0x6F12, 0xB4F5,
	0x6F12, 0x817F,
	0x6F12, 0x11D1,
	0x6F12, 0xA149,
	0x6F12, 0x0120,
	0x6F12, 0x81F8,
	0x6F12, 0xF805,
	0x6F12, 0x0420,
	0x6F12, 0x86F8,
	0x6F12, 0xE702,
	0x6F12, 0x0020,
	0x6F12, 0x00F0,
	0x6F12, 0x71FC,
	0x6F12, 0xBDE8,
	0x6F12, 0xF041,
	0x6F12, 0x0020,
	0x6F12, 0x00F0,
	0x6F12, 0x71BC,
	0x6F12, 0x9A48,
	0x6F12, 0x80F8,
	0x6F12, 0xF875,
	0x6F12, 0xBDE8,
	0x6F12, 0xF081,
	0x6F12, 0x2DE9,
	0x6F12, 0xF74F,
	0x6F12, 0x9248,
	0x6F12, 0x0D46,
	0x6F12, 0x9346,
	0x6F12, 0x406B,
	0x6F12, 0x0022,
	0x6F12, 0x4FEA,
	0x6F12, 0x1049,
	0x6F12, 0x80B2,
	0x6F12, 0x8246,
	0x6F12, 0x0146,
	0x6F12, 0x4846,
	0x6F12, 0x00F0,
	0x6F12, 0xC2FB,
	0x6F12, 0x9348,
	0x6F12, 0x00F5,
	0x6F12, 0xBF67,
	0x6F12, 0xD0F8,
	0x6F12, 0xF885,
	0x6F12, 0x00F5,
	0x6F12, 0xBC66,
	0x6F12, 0xD0F8,
	0x6F12, 0xE045,
	0x6F12, 0x4FF4,
	0x6F12, 0x3570,
	0x6F12, 0xA4FB,
	0x6F12, 0x0020,
	0x6F12, 0x0CE0,
	0x6F12, 0x8C49,
	0x6F12, 0xD1F8,
	0x6F12, 0xF815,
	0x6F12, 0x4908,
	0x6F12, 0x3960,
	0x6F12, 0x8949,
	0x6F12, 0xD1F8,
	0x6F12, 0xE015,
	0x6F12, 0x4908,
	0x6F12, 0x4008,
	0x6F12, 0x3160,
	0x6F12, 0x4FEA,
	0x6F12, 0x3202,
	0x6F12, 0x4FF0,
	0x6F12, 0xFF33,
	0x6F12, 0x4FF0,
	0x6F12, 0x0001,
	0x6F12, 0x9B1A,
	0x6F12, 0x8141,
	0x6F12, 0xEBD3,
	0x6F12, 0x5A46,
	0x6F12, 0x2946,
	0x6F12, 0x0098,
	0x6F12, 0x00F0,
	0x6F12, 0x3BFC,
	0x6F12, 0x00F0,
	0x6F12, 0x3EFC,
	0x6F12, 0x0328,
	0x6F12, 0x02D0,
	0x6F12, 0x0228,
	0x6F12, 0x02D0,
	0x6F12, 0x03E0,
	0x6F12, 0x1320,
	0x6F12, 0x00E0,
	0x6F12, 0x0320,
	0x6F12, 0x2882,
	0x6F12, 0x7A49,
	0x6F12, 0x0122,
	0x6F12, 0x0846,
	0x6F12, 0xC1F8,
	0x6F12, 0xF885,
	0x6F12, 0xC0F8,
	0x6F12, 0xE045,
	0x6F12, 0x03B0,
	0x6F12, 0x5146,
	0x6F12, 0x4846,
	0x6F12, 0xBDE8,
	0x6F12, 0xF04F,
	0x6F12, 0x00F0,
	0x6F12, 0x82BB,
	0x6F12, 0x2DE9,
	0x6F12, 0xF041,
	0x6F12, 0x0646,
	0x6F12, 0x6A48,
	0x6F12, 0x0024,
	0x6F12, 0x2246,
	0x6F12, 0x816B,
	0x6F12, 0x0D0C,
	0x6F12, 0x8FB2,
	0x6F12, 0x3946,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0x75FB,
	0x6F12, 0x6948,
	0x6F12, 0x90F8,
	0x6F12, 0x7106,
	0x6F12, 0x18B1,
	0x6F12, 0x3046,
	0x6F12, 0x00F0,
	0x6F12, 0x18FC,
	0x6F12, 0x0446,
	0x6F12, 0x0122,
	0x6F12, 0x3946,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0x68FB,
	0x6F12, 0x2046,
	0x6F12, 0x92E7,
	0x6F12, 0x624A,
	0x6F12, 0x10B5,
	0x6F12, 0x92F8,
	0x6F12, 0x6926,
	0x6F12, 0x022A,
	0x6F12, 0x02D0,
	0x6F12, 0x032A,
	0x6F12, 0x02D0,
	0x6F12, 0x0AE0,
	0x6F12, 0x0122,
	0x6F12, 0x05E0,
	0x6F12, 0x5C4A,
	0x6F12, 0x92F8,
	0x6F12, 0x6B26,
	0x6F12, 0x012A,
	0x6F12, 0x03D1,
	0x6F12, 0x0222,
	0x6F12, 0x594B,
	0x6F12, 0x83F8,
	0x6F12, 0x6926,
	0x6F12, 0x00F0,
	0x6F12, 0xFFFB,
	0x6F12, 0x5B48,
	0x6F12, 0x0078,
	0x6F12, 0x0028,
	0x6F12, 0x1CD0,
	0x6F12, 0x5548,
	0x6F12, 0x5449,
	0x6F12, 0x90F8,
	0x6F12, 0x6A06,
	0x6F12, 0x0028,
	0x6F12, 0x91F8,
	0x6F12, 0xBB00,
	0x6F12, 0x0AD0,
	0x6F12, 0x0028,
	0x6F12, 0x12D0,
	0x6F12, 0x91F8,
	0x6F12, 0x9815,
	0x6F12, 0x0129,
	0x6F12, 0x0ED1,
	0x6F12, 0xBDE8,
	0x6F12, 0x1040,
	0x6F12, 0x0321,
	0x6F12, 0x00F0,
	0x6F12, 0xEDBB,
	0x6F12, 0x0028,
	0x6F12, 0x07D0,
	0x6F12, 0x91F8,
	0x6F12, 0xBA10,
	0x6F12, 0x8842,
	0x6F12, 0x03D0,
	0x6F12, 0xBDE8,
	0x6F12, 0x1040,
	0x6F12, 0x00F0,
	0x6F12, 0xE8BB,
	0x6F12, 0x10BD,
	0x6F12, 0x2DE9,
	0x6F12, 0xF84F,
	0x6F12, 0xDFF8,
	0x6F12, 0x04B1,
	0x6F12, 0xDDE9,
	0x6F12, 0x0A45,
	0x6F12, 0x8246,
	0x6F12, 0x0F46,
	0x6F12, 0x0020,
	0x6F12, 0x41F6,
	0x6F12, 0xFC31,
	0x6F12, 0x0BF1,
	0x6F12, 0x4C0B,
	0x6F12, 0x1E46,
	0x6F12, 0x9046,
	0x6F12, 0x8DF8,
	0x6F12, 0x0000,
	0x6F12, 0x0BEB,
	0x6F12, 0x0109,
	0x6F12, 0x2FE0,
	0x6F12, 0x0002,
	0x6F12, 0x2860,
	0x6F12, 0x4048,
	0x6F12, 0xB0F8,
	0x6F12, 0xBE10,
	0x6F12, 0xA1F5,
	0x6F12, 0x9052,
	0x6F12, 0x3D3A,
	0x6F12, 0x06D0,
	0x6F12, 0x2068,
	0x6F12, 0x0122,
	0x6F12, 0x3844,
	0x6F12, 0x6946,
	0x6F12, 0x00F0,
	0x6F12, 0xC9FB,
	0x6F12, 0x14E0,
	0x6F12, 0x0078,
	0x6F12, 0x90B3,
	0x6F12, 0xBAF1,
	0x6F12, 0x020F,
	0x6F12, 0x03D1,
	0x6F12, 0x2168,
	0x6F12, 0x11F8,
	0x6F12, 0x0900,
	0x6F12, 0x09E0,
	0x6F12, 0x2068,
	0x6F12, 0xC119,
	0x6F12, 0x3448,
	0x6F12, 0xB0F8,
	0x6F12, 0x4000,
	0x6F12, 0x091A,
	0x6F12, 0x01EB,
	0x6F12, 0x0B00,
	0x6F12, 0x90F8,
	0x6F12, 0xA400,
	0x6F12, 0x8DF8,
	0x6F12, 0x0000,
	0x6F12, 0x9DF8,
	0x6F12, 0x0010,
	0x6F12, 0x2868,
	0x6F12, 0x0843,
	0x6F12, 0x2860,
	0x6F12, 0x2068,
	0x6F12, 0x401C,
	0x6F12, 0x2060,
	0x6F12, 0x3068,
	0x6F12, 0x0830,
	0x6F12, 0x3060,
	0x6F12, 0x3168,
	0x6F12, 0x2868,
	0x6F12, 0x4145,
	0x6F12, 0xCBDB,
	0x6F12, 0xA1EB,
	0x6F12, 0x0802,
	0x6F12, 0xD040,
	0x6F12, 0x0121,
	0x6F12, 0x01FA,
	0x6F12, 0x08F1,
	0x6F12, 0x491E,
	0x6F12, 0x0840,
	0x6F12, 0x0C99,
	0x6F12, 0x19B1,
	0x6F12, 0xC8F1,
	0x6F12, 0x2001,
	0x6F12, 0x8840,
	0x6F12, 0x0841,
	0x6F12, 0x3260,
	0x6F12, 0xBDE8,
	0x6F12, 0xF88F,
	0x6F12, 0xFFE7,
	0x6F12, 0xBAF1,
	0x6F12, 0x000F,
	0x6F12, 0xCFD0,
	0x6F12, 0xCAE7,
	0x6F12, 0x10B5,
	0x6F12, 0xD478,
	0x6F12, 0x0123,
	0x6F12, 0x03FA,
	0x6F12, 0x04F4,
	0x6F12, 0x641E,
	0x6F12, 0x9460,
	0x6F12, 0xD47E,
	0x6F12, 0x03FA,
	0x6F12, 0x04F4,
	0x6F12, 0x641E,
	0x6F12, 0xD461,
	0x6F12, 0xD0E9,
	0x6F12, 0x0142,
	0x6F12, 0x6243,
	0x6F12, 0x183A,
	0x6F12, 0x0A60,
	0x6F12, 0x4268,
	0x6F12, 0x02EB,
	0x6F12, 0xD272,
	0x6F12, 0x03EB,
	0x6F12, 0x6202,
	0x6F12, 0x4A60,
	0x6F12, 0x8068,
	0x6F12, 0x00EB,
	0x6F12, 0xD070,
	0x6F12, 0x03EB,
	0x6F12, 0x6000,
	0x6F12, 0x02FB,
	0x6F12, 0x00F3,
	0x6F12, 0x9B1F,
	0x6F12, 0xC1E9,
	0x6F12, 0x0203,
	0x6F12, 0x0023,
	0x6F12, 0x0B61,
	0x6F12, 0x531E,
	0x6F12, 0x4B61,
	0x6F12, 0x431E,
	0x6F12, 0x15E0,
	0x6F12, 0x2001,
	0x6F12, 0xD1C0,
	0x6F12, 0x2001,
	0x6F12, 0x6A40,
	0x6F12, 0x2000,
	0x6F12, 0x2050,
	0x6F12, 0x2000,
	0x6F12, 0x8A50,
	0x6F12, 0x2001,
	0x6F12, 0x35A0,
	0x6F12, 0x2000,
	0x6F12, 0x1300,
	0x6F12, 0x4000,
	0x6F12, 0x6532,
	0x6F12, 0x2001,
	0x6F12, 0x7140,
	0x6F12, 0x2001,
	0x6F12, 0xF7CC,
	0x6F12, 0x2000,
	0x6F12, 0x4EC0,
	0x6F12, 0x2000,
	0x6F12, 0xA050,
	0x6F12, 0x5343,
	0x6F12, 0x5043,
	0x6F12, 0xCB61,
	0x6F12, 0x401E,
	0x6F12, 0x4862,
	0x6F12, 0x5B1E,
	0x6F12, 0x401E,
	0x6F12, 0x8B61,
	0x6F12, 0x0862,
	0x6F12, 0x10BD,
	0x6F12, 0x70B5,
	0x6F12, 0xFE48,
	0x6F12, 0x0022,
	0x6F12, 0x406C,
	0x6F12, 0x86B2,
	0x6F12, 0x050C,
	0x6F12, 0x3146,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0x7FFA,
	0x6F12, 0x00F0,
	0x6F12, 0x40FB,
	0x6F12, 0xF948,
	0x6F12, 0xF94C,
	0x6F12, 0x90F8,
	0x6F12, 0x6906,
	0x6F12, 0x0328,
	0x6F12, 0x01D0,
	0x6F12, 0x28B1,
	0x6F12, 0x09E0,
	0x6F12, 0xF549,
	0x6F12, 0x0520,
	0x6F12, 0x81F8,
	0x6F12, 0x6B06,
	0x6F12, 0x04E0,
	0x6F12, 0x94F8,
	0x6F12, 0xBA00,
	0x6F12, 0x08B1,
	0x6F12, 0x00F0,
	0x6F12, 0x24FB,
	0x6F12, 0xF048,
	0x6F12, 0x90F8,
	0x6F12, 0x6A06,
	0x6F12, 0x40B9,
	0x6F12, 0x94F8,
	0x6F12, 0xBB00,
	0x6F12, 0x28B1,
	0x6F12, 0x94F8,
	0x6F12, 0xBA10,
	0x6F12, 0x8842,
	0x6F12, 0x01D0,
	0x6F12, 0x00F0,
	0x6F12, 0x17FB,
	0x6F12, 0x3146,
	0x6F12, 0x2846,
	0x6F12, 0xBDE8,
	0x6F12, 0x7040,
	0x6F12, 0x0122,
	0x6F12, 0x00F0,
	0x6F12, 0x57BA,
	0x6F12, 0x70B5,
	0x6F12, 0x0446,
	0x6F12, 0xE448,
	0x6F12, 0x0022,
	0x6F12, 0x806C,
	0x6F12, 0x86B2,
	0x6F12, 0x050C,
	0x6F12, 0x3146,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0x4CFA,
	0x6F12, 0x2046,
	0x6F12, 0x00F0,
	0x6F12, 0x11FB,
	0x6F12, 0x0446,
	0x6F12, 0xE048,
	0x6F12, 0x0078,
	0x6F12, 0x48B1,
	0x6F12, 0x44B1,
	0x6F12, 0xDD48,
	0x6F12, 0x90F8,
	0x6F12, 0x6B06,
	0x6F12, 0x0528,
	0x6F12, 0x03D1,
	0x6F12, 0xDA49,
	0x6F12, 0x0120,
	0x6F12, 0x81F8,
	0x6F12, 0x7006,
	0x6F12, 0x0122,
	0x6F12, 0x3146,
	0x6F12, 0x2846,
	0x6F12, 0x00F0,
	0x6F12, 0x36FA,
	0x6F12, 0xE0B2,
	0x6F12, 0x70BD,
	0x6F12, 0x10B5,
	0x6F12, 0x00F0,
	0x6F12, 0xFEFA,
	0x6F12, 0xD548,
	0x6F12, 0xD649,
	0x6F12, 0x408A,
	0x6F12, 0x0880,
	0x6F12, 0xD549,
	0x6F12, 0x0880,
	0x6F12, 0x10BD,
	0x6F12, 0x10B5,
	0x6F12, 0x0446,
	0x6F12, 0x00F0,
	0x6F12, 0xF8FA,
	0x6F12, 0x24FA,
	0x6F12, 0x00F1,
	0x6F12, 0xBDE8,
	0x6F12, 0x1040,
	0x6F12, 0x4FF2,
	0x6F12, 0x1E00,
	0x6F12, 0x00F0,
	0x6F12, 0xF5BA,
	0x6F12, 0x2DE9,
	0x6F12, 0xFE4F,
	0x6F12, 0x8246,
	0x6F12, 0xC948,
	0x6F12, 0xC749,
	0x6F12, 0x8730,
	0x6F12, 0x4C31,
	0x6F12, 0x0078,
	0x6F12, 0x44F2,
	0x6F12, 0x4C32,
	0x6F12, 0x00EB,
	0x6F12, 0x4000,
	0x6F12, 0x01EB,
	0x6F12, 0x4000,
	0x6F12, 0x42F2,
	0x6F12, 0xC851,
	0x6F12, 0x00EB,
	0x6F12, 0x0108,
	0x6F12, 0x0020,
	0x6F12, 0x8DF8,
	0x6F12, 0x0000,
	0x6F12, 0xC448,
	0x6F12, 0x0290,
	0x6F12, 0xBF48,
	0x6F12, 0x0AEB,
	0x6F12, 0x8A01,
	0x6F12, 0x8B30,
	0x6F12, 0x0190,
	0x6F12, 0xC248,
	0x6F12, 0xBC4B,
	0x6F12, 0x00EB,
	0x6F12, 0x8111,
	0x6F12, 0x8C18,
	0x6F12, 0x8B33,
	0x6F12, 0xC079,
	0x6F12, 0x03F5,
	0x6F12, 0x8072,
	0x6F12, 0x20B1,
	0x6F12, 0x0827,
	0x6F12, 0x98F8,
	0x6F12, 0x0060,
	0x6F12, 0x0025,
	0x6F12, 0x23E0,
	0x6F12, 0x0427,
	0x6F12, 0xF9E7,
	0x6F12, 0xF007,
	0x6F12, 0x02D0,
	0x6F12, 0xB8F8,
	0x6F12, 0x02C0,
	0x6F12, 0x01E0,
	0x6F12, 0x4FF4,
	0x6F12, 0x005C,
	0x6F12, 0x0021,
	0x6F12, 0x4FF4,
	0x6F12, 0x8049,
	0x6F12, 0x12E0,
	0x6F12, 0x01CC,
	0x6F12, 0x00FB,
	0x6F12, 0x0CF0,
	0x6F12, 0x00F5,
	0x6F12, 0x8050,
	0x6F12, 0x400B,
	0x6F12, 0x01C3,
	0x6F12, 0x4845,
	0x6F12, 0x01D2,
	0x6F12, 0x0020,
	0x6F12, 0x04E0,
	0x6F12, 0xB0FA,
	0x6F12, 0x80F0,
	0x6F12, 0xC0F1,
	0x6F12, 0x1200,
	0x6F12, 0xC0B2,
	0x6F12, 0x02F8,
	0x6F12, 0x010B,
	0x6F12, 0x491C,
	0x6F12, 0xB942,
	0x6F12, 0xEAD3,
	0x6F12, 0x7608,
	0x6F12, 0x6D1C,
	0x6F12, 0xBD42,
	0x6F12, 0xDBD3,
	0x6F12, 0xA848,
	0x6F12, 0x0078,
	0x6F12, 0x0028,
	0x6F12, 0x07D0,
	0x6F12, 0xA749,
	0x6F12, 0x01EB,
	0x6F12, 0xCA00,
	0x6F12, 0xD0F8,
	0x6F12, 0xA011,
	0x6F12, 0x6846,
	0x6F12, 0x00F0,
	0x6F12, 0x9DFA,
	0x6F12, 0xBDE8,
	0x6F12, 0xFE8F,
	0x6F12, 0x9B48,
	0x6F12, 0x801C,
	0x6F12, 0x0178,
	0x6F12, 0x481E,
	0x6F12, 0x0528,
	0x6F12, 0x01DA,
	0x6F12, 0x491E,
	0x6F12, 0x00E0,
	0x6F12, 0x0521,
	0x6F12, 0x9748,
	0x6F12, 0x8730,
	0x6F12, 0x0278,
	0x6F12, 0x8A42,
	0x6F12, 0x02D2,
	0x6F12, 0x521C,
	0x6F12, 0x0270,
	0x6F12, 0x7047,
	0x6F12, 0x0021,
	0x6F12, 0x0170,
	0x6F12, 0x7047,
	0x6F12, 0x70B5,
	0x6F12, 0x9048,
	0x6F12, 0x90F8,
	0x6F12, 0x7307,
	0x6F12, 0xC007,
	0x6F12, 0x40D0,
	0x6F12, 0x8E49,
	0x6F12, 0x8831,
	0x6F12, 0x0D78,
	0x6F12, 0x95F0,
	0x6F12, 0x0100,
	0x6F12, 0x0870,
	0x6F12, 0x02D0,
	0x6F12, 0x4FF0,
	0x6F12, 0xFF31,
	0x6F12, 0x00E0,
	0x6F12, 0x0021,
	0x6F12, 0x9148,
	0x6F12, 0x884A,
	0x6F12, 0x521D,
	0x6F12, 0xB0F8,
	0x6F12, 0xD400,
	0x6F12, 0x1288,
	0x6F12, 0x401E,
	0x6F12, 0x8242,
	0x6F12, 0x01D3,
	0x6F12, 0x0022,
	0x6F12, 0x03E0,
	0x6F12, 0x821A,
	0x6F12, 0x4FF6,
	0x6F12, 0xF070,
	0x6F12, 0x0240,
	0x6F12, 0x8A4C,
	0x6F12, 0x2089,
	0x6F12, 0x804B,
	0x6F12, 0x8533,
	0x6F12, 0x1880,
	0x6F12, 0x2089,
	0x6F12, 0x20F0,
	0x6F12, 0x0F03,
	0x6F12, 0x9342,
	0x6F12, 0xFAD1,
	0x6F12, 0x8648,
	0x6F12, 0x00F0,
	0x6F12, 0x55FA,
	0x6F12, 0x7B48,
	0x6F12, 0x784B,
	0x6F12, 0x8330,
	0x6F12, 0x011D,
	0x6F12, 0x4C33,
	0x6F12, 0x0978,
	0x6F12, 0x0288,
	0x6F12, 0x01EB,
	0x6F12, 0x4101,
	0x6F12, 0x03EB,
	0x6F12, 0x4101,
	0x6F12, 0x42F2,
	0x6F12, 0xCC53,
	0x6F12, 0xC95A,
	0x6F12, 0x1144,
	0x6F12, 0x89B2,
	0x6F12, 0x0180,
	0x6F12, 0x0846,
	0x6F12, 0xFFF7,
	0x6F12, 0x40FF,
	0x6F12, 0xFFF7,
	0x6F12, 0xA9FF,
	0x6F12, 0x2846,
	0x6F12, 0xBDE8,
	0x6F12, 0x7040,
	0x6F12, 0x45E7,
	0x6F12, 0x70BD,
	0x6F12, 0x10B5,
	0x6F12, 0x4FF4,
	0x6F12, 0x4161,
	0x6F12, 0x0F20,
	0x6F12, 0x00F0,
	0x6F12, 0x3EFA,
	0x6F12, 0x0446,
	0x6F12, 0xC006,
	0x6F12, 0x01D5,
	0x6F12, 0xFFF7,
	0x6F12, 0xADFF,
	0x6F12, 0x6005,
	0x6F12, 0x08D5,
	0x6F12, 0x6648,
	0x6F12, 0xB0F8,
	0x6F12, 0x2816,
	0x6F12, 0x21B1,
	0x6F12, 0xD0F8,
	0x6F12, 0x2C26,
	0x6F12, 0x0120,
	0x6F12, 0x00F0,
	0x6F12, 0x33FA,
	0x6F12, 0x2005,
	0x6F12, 0x0BD5,
	0x6F12, 0x6048,
	0x6F12, 0xD0F8,
	0x6F12, 0x2C26,
	0x6F12, 0x002A,
	0x6F12, 0x06D0,
	0x6F12, 0xB0F8,
	0x6F12, 0x2816,
	0x6F12, 0xBDE8,
	0x6F12, 0x1040,
	0x6F12, 0x0220,
	0x6F12, 0x00F0,
	0x6F12, 0x25BA,
	0x6F12, 0x10BD,
	0x6F12, 0x5B48,
	0x6F12, 0x10B5,
	0x6F12, 0x401C,
	0x6F12, 0x0078,
	0x6F12, 0xF0B1,
	0x6F12, 0x5848,
	0x6F12, 0x0024,
	0x6F12, 0x8730,
	0x6F12, 0x0470,
	0x6F12, 0x5548,
	0x6F12, 0xB0F8,
	0x6F12, 0x4A13,
	0x6F12, 0xB0F8,
	0x6F12, 0x4C03,
	0x6F12, 0x0844,
	0x6F12, 0x5349,
	0x6F12, 0xC91C,
	0x6F12, 0x91F9,
	0x6F12, 0x0010,
	0x6F12, 0x0844,
	0x6F12, 0x5149,
	0x6F12, 0x80B2,
	0x6F12, 0x8331,
	0x6F12, 0x0880,
	0x6F12, 0xFFF7,
	0x6F12, 0xFAFE,
	0x6F12, 0x4E48,
	0x6F12, 0x0021,
	0x6F12, 0x8830,
	0x6F12, 0x0470,
	0x6F12, 0x5648,
	0x6F12, 0x00F0,
	0x6F12, 0xF4F9,
	0x6F12, 0x0120,
	0x6F12, 0xFFF7,
	0x6F12, 0xFCFE,
	0x6F12, 0x494C,
	0x6F12, 0x8934,
	0x6F12, 0x2078,
	0x6F12, 0x0028,
	0x6F12, 0x09D1,
	0x6F12, 0x4FF2,
	0x6F12, 0xEF33,
	0x6F12, 0x0322,
	0x6F12, 0xAFF2,
	0x6F12, 0xA301,
	0x6F12, 0x0F20,
	0x6F12, 0x00F0,
	0x6F12, 0xF8F9,
	0x6F12, 0x0120,
	0x6F12, 0x2070,
	0x6F12, 0x10BD,
	0x6F12, 0x10B5,
	0x6F12, 0x00F0,
	0x6F12, 0xF7F9,
	0x6F12, 0x3F48,
	0x6F12, 0x401C,
	0x6F12, 0x0078,
	0x6F12, 0x0028,
	0x6F12, 0x02D0,
	0x6F12, 0xBDE8,
	0x6F12, 0x1040,
	0x6F12, 0xC0E7,
	0x6F12, 0x10BD,
	0x6F12, 0x70B5,
	0x6F12, 0x454C,
	0x6F12, 0x0022,
	0x6F12, 0xAFF6,
	0x6F12, 0x1F21,
	0x6F12, 0x636B,
	0x6F12, 0x4448,
	0x6F12, 0x9847,
	0x6F12, 0x354D,
	0x6F12, 0x0022,
	0x6F12, 0x6861,
	0x6F12, 0xAFF6,
	0x6F12, 0x7111,
	0x6F12, 0x636B,
	0x6F12, 0x4148,
	0x6F12, 0x9847,
	0x6F12, 0xA861,
	0x6F12, 0x636B,
	0x6F12, 0x0022,
	0x6F12, 0x3F49,
	0x6F12, 0x4048,
	0x6F12, 0x9847,
	0x6F12, 0x2860,
	0x6F12, 0x636B,
	0x6F12, 0x0022,
	0x6F12, 0x3E49,
	0x6F12, 0x3F48,
	0x6F12, 0x9847,
	0x6F12, 0x6860,
	0x6F12, 0x636B,
	0x6F12, 0x0022,
	0x6F12, 0x3D49,
	0x6F12, 0x3E48,
	0x6F12, 0x9847,
	0x6F12, 0xE860,
	0x6F12, 0x636B,
	0x6F12, 0x0022,
	0x6F12, 0x3C49,
	0x6F12, 0x3D48,
	0x6F12, 0x9847,
	0x6F12, 0x3D4E,
	0x6F12, 0xA860,
	0x6F12, 0x4FF4,
	0x6F12, 0x8060,
	0x6F12, 0x3168,
	0x6F12, 0x0022,
	0x6F12, 0xA1F8,
	0x6F12, 0x6600,
	0x6F12, 0xAFF6,
	0x6F12, 0x2F11,
	0x6F12, 0x636B,
	0x6F12, 0x3848,
	0x6F12, 0x9847,
	0x6F12, 0xE861,
	0x6F12, 0x0022,
	0x6F12, 0xAFF6,
	0x6F12, 0xBF01,
	0x6F12, 0x636B,
	0x6F12, 0x3648,
	0x6F12, 0x9847,
	0x6F12, 0x2862,
	0x6F12, 0x0022,
	0x6F12, 0xAFF6,
	0x6F12, 0xB901,
	0x6F12, 0x636B,
	0x6F12, 0x3348,
	0x6F12, 0x9847,
	0x6F12, 0x6862,
	0x6F12, 0xAFF6,
	0x6F12, 0x8300,
	0x6F12, 0xA063,
	0x6F12, 0x636B,
	0x6F12, 0x0022,
	0x6F12, 0x3049,
	0x6F12, 0x3148,
	0x6F12, 0x9847,
	0x6F12, 0x2861,
	0x6F12, 0x0022,
	0x6F12, 0xAFF6,
	0x6F12, 0x8501,
	0x6F12, 0x636B,
	0x6F12, 0x2E48,
	0x6F12, 0x9847,
	0x6F12, 0xA862,
	0x6F12, 0x0022,
	0x6F12, 0xAFF6,
	0x6F12, 0x0B01,
	0x6F12, 0x636B,
	0x6F12, 0x2C48,
	0x6F12, 0x9847,
	0x6F12, 0xE862,
	0x6F12, 0x0022,
	0x6F12, 0xAFF2,
	0x6F12, 0x6771,
	0x6F12, 0x636B,
	0x6F12, 0x2948,
	0x6F12, 0x9847,
	0x6F12, 0x2863,
	0x6F12, 0x0022,
	0x6F12, 0xAFF2,
	0x6F12, 0x6F61,
	0x6F12, 0x636B,
	0x6F12, 0x2748,
	0x6F12, 0x9847,
	0x6F12, 0x6863,
	0x6F12, 0x0022,
	0x6F12, 0xAFF2,
	0x6F12, 0x3551,
	0x6F12, 0x636B,
	0x6F12, 0x2448,
	0x6F12, 0x9847,
	0x6F12, 0xE863,
	0x6F12, 0x0022,
	0x6F12, 0x46E0,
	0x6F12, 0x0000,
	0x6F12, 0x2001,
	0x6F12, 0xD1C0,
	0x6F12, 0x2001,
	0x6F12, 0x35A0,
	0x6F12, 0x2001,
	0x6F12, 0xF7CD,
	0x6F12, 0x2000,
	0x6F12, 0x3CD0,
	0x6F12, 0x4001,
	0x6F12, 0xD70A,
	0x6F12, 0x4001,
	0x6F12, 0xD80A,
	0x6F12, 0x2001,
	0x6F12, 0xB488,
	0x6F12, 0x2001,
	0x6F12, 0x7140,
	0x6F12, 0x2000,
	0x6F12, 0x3760,
	0x6F12, 0x2000,
	0x6F12, 0x9A90,
	0x6F12, 0x2001,
	0x6F12, 0x6A40,
	0x6F12, 0x4000,
	0x6F12, 0xF000,
	0x6F12, 0x0001,
	0x6F12, 0xD004,
	0x6F12, 0x2000,
	0x6F12, 0x99B0,
	0x6F12, 0x0001,
	0x6F12, 0x644B,
	0x6F12, 0x0001,
	0x6F12, 0x63E7,
	0x6F12, 0x2001,
	0x6F12, 0xBA3D,
	0x6F12, 0x0002,
	0x6F12, 0xB9AD,
	0x6F12, 0x2001,
	0x6F12, 0xBA7D,
	0x6F12, 0x0000,
	0x6F12, 0xCC0D,
	0x6F12, 0x2001,
	0x6F12, 0xBB11,
	0x6F12, 0x0002,
	0x6F12, 0xBD05,
	0x6F12, 0x2001,
	0x6F12, 0xBAD9,
	0x6F12, 0x0002,
	0x6F12, 0xAC03,
	0x6F12, 0x2000,
	0x6F12, 0x0C50,
	0x6F12, 0x0002,
	0x6F12, 0x1C05,
	0x6F12, 0x0002,
	0x6F12, 0xC877,
	0x6F12, 0x0001,
	0x6F12, 0xB83F,
	0x6F12, 0x2001,
	0x6F12, 0xBB1D,
	0x6F12, 0x0000,
	0x6F12, 0x54D1,
	0x6F12, 0x0002,
	0x6F12, 0x1483,
	0x6F12, 0x0002,
	0x6F12, 0xB593,
	0x6F12, 0x0002,
	0x6F12, 0x01C5,
	0x6F12, 0x0000,
	0x6F12, 0x4765,
	0x6F12, 0x0000,
	0x6F12, 0x8F49,
	0x6F12, 0xAFF2,
	0x6F12, 0x1951,
	0x6F12, 0x636B,
	0x6F12, 0x1848,
	0x6F12, 0x9847,
	0x6F12, 0x2864,
	0x6F12, 0x0022,
	0x6F12, 0xAFF2,
	0x6F12, 0x8961,
	0x6F12, 0x636B,
	0x6F12, 0x1548,
	0x6F12, 0x9847,
	0x6F12, 0xA863,
	0x6F12, 0xAFF2,
	0x6F12, 0x5D60,
	0x6F12, 0x2061,
	0x6F12, 0x0022,
	0x6F12, 0xAFF2,
	0x6F12, 0xAB41,
	0x6F12, 0x636B,
	0x6F12, 0x1148,
	0x6F12, 0x9847,
	0x6F12, 0x6864,
	0x6F12, 0x0022,
	0x6F12, 0xAFF2,
	0x6F12, 0x5741,
	0x6F12, 0x636B,
	0x6F12, 0x0F48,
	0x6F12, 0x9847,
	0x6F12, 0xA864,
	0x6F12, 0xAFF2,
	0x6F12, 0x1D40,
	0x6F12, 0x2063,
	0x6F12, 0xAFF2,
	0x6F12, 0xCD10,
	0x6F12, 0x2062,
	0x6F12, 0x6422,
	0x6F12, 0x0021,
	0x6F12, 0x0A48,
	0x6F12, 0x00F0,
	0x6F12, 0x11F9,
	0x6F12, 0x0A49,
	0x6F12, 0x43F2,
	0x6F12, 0x9B40,
	0x6F12, 0xC1F8,
	0x6F12, 0x5007,
	0x6F12, 0x0846,
	0x6F12, 0x3168,
	0x6F12, 0xB0F8,
	0x6F12, 0x5607,
	0x6F12, 0x4883,
	0x6F12, 0x70BD,
	0x6F12, 0x0000,
	0x6F12, 0xA541,
	0x6F12, 0x0001,
	0x6F12, 0x9B8F,
	0x6F12, 0x0001,
	0x6F12, 0x9EB7,
	0x6F12, 0x0001,
	0x6F12, 0x9D55,
	0x6F12, 0x2001,
	0x6F12, 0xF7F4,
	0x6F12, 0x2001,
	0x6F12, 0x35A0,
	0x6F12, 0x4FF2,
	0x6F12, 0x756C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF2,
	0x6F12, 0x596C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0xAD1C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4AF6,
	0x6F12, 0x034C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x45F2,
	0x6F12, 0xD14C,
	0x6F12, 0xC0F2,
	0x6F12, 0x000C,
	0x6F12, 0x6047,
	0x6F12, 0x45F2,
	0x6F12, 0x7B3C,
	0x6F12, 0xC0F2,
	0x6F12, 0x000C,
	0x6F12, 0x6047,
	0x6F12, 0x40F2,
	0x6F12, 0x652C,
	0x6F12, 0xC0F2,
	0x6F12, 0x030C,
	0x6F12, 0x6047,
	0x6F12, 0x45F6,
	0x6F12, 0xEF6C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x46F2,
	0x6F12, 0x4B4C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x45F6,
	0x6F12, 0xC56C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x45F6,
	0x6F12, 0xDB6C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x48F2,
	0x6F12, 0x7F1C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0x536C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0x496C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x46F2,
	0x6F12, 0x991C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x46F2,
	0x6F12, 0xD91C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x41F6,
	0x6F12, 0x054C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0x3F0C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0x290C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x41F2,
	0x6F12, 0x834C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF2,
	0x6F12, 0x935C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x48F2,
	0x6F12, 0x311C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF6,
	0x6F12, 0xED3C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF6,
	0x6F12, 0xED4C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF6,
	0x6F12, 0x095C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x40F2,
	0x6F12, 0x410C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF2,
	0x6F12, 0x176C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x40F2,
	0x6F12, 0xED0C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x48F6,
	0x6F12, 0xEF1C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF2,
	0x6F12, 0xCB5C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x48F2,
	0x6F12, 0x894C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x48F2,
	0x6F12, 0x671C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x48F2,
	0x6F12, 0x7B4C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x44F2,
	0x6F12, 0x657C,
	0x6F12, 0xC0F2,
	0x6F12, 0x000C,
	0x6F12, 0x6047,
	0x6F12, 0x48F2,
	0x6F12, 0xC30C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x49F6,
	0x6F12, 0x8F3C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4AF2,
	0x6F12, 0xB12C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF2,
	0x6F12, 0x035C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF2,
	0x6F12, 0xE34C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4DF2,
	0x6F12, 0x735C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x49F6,
	0x6F12, 0xB76C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x49F6,
	0x6F12, 0x555C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x40F2,
	0x6F12, 0xD76C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4CF2,
	0x6F12, 0x754C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF2,
	0x6F12, 0xB96C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x43F2,
	0x6F12, 0x730C,
	0x6F12, 0xC0F2,
	0x6F12, 0x000C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0x0D3C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x4BF6,
	0x6F12, 0x5D5C,
	0x6F12, 0xC0F2,
	0x6F12, 0x020C,
	0x6F12, 0x6047,
	0x6F12, 0x4CF2,
	0x6F12, 0xDB1C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x43F6,
	0x6F12, 0x470C,
	0x6F12, 0xC0F2,
	0x6F12, 0x000C,
	0x6F12, 0x6047,
	0x6F12, 0x4FF6,
	0x6F12, 0x771C,
	0x6F12, 0xC0F2,
	0x6F12, 0x010C,
	0x6F12, 0x6047,
	0x6F12, 0x0000
};

static void sensor_init(void)
{
	pr_debug("%s E\n", __func__);
	/* initial sequence */
	// Convert from : "InitGlobal.sset"
	pr_debug("[%s] +", __func__);

	write_cmos_sensor(0x6010, 0x0001);
	mdelay(8);
	write_cmos_sensor(0xFCFC, 0x4000);
	write_cmos_sensor(0x6028, 0x4000);
	write_cmos_sensor(0x6214, 0xF9F0);
	write_cmos_sensor(0x6218, 0xF150);
	write_cmos_sensor(0x001E, 0x5230);
	write_cmos_sensor(0x0136, 0x1800);
	table_write_cmos_sensor(addr_data_pair_init_gw1,
		sizeof(addr_data_pair_init_gw1) / sizeof(kal_uint16));
	pr_debug("[%s] -", __func__);
}				/*      sensor_init  */

static kal_uint16 addr_data_pair_pre_gw1[] = {
	0x6028, 0x2000,
	0x602A, 0x3608,
	0x6F12, 0x1FFF,
	0x6F12, 0x1FFF,
	0x602A, 0x35CC,
	0x6F12, 0x3B1F,
	0x6F12, 0xFFFC,
	0x602A, 0x36D8,
	0x6F12, 0x000A,
	0x602A, 0x36DC,
	0x6F12, 0x000F,
	0x6F12, 0x000F,
	0x602A, 0x36DA,
	0x6F12, 0x0018,
	0x602A, 0x36E2,
	0x6F12, 0x0011,
	0x602A, 0x35C4,
	0x6F12, 0x5008,
	0x602A, 0x229C,
	0x6F12, 0x0009,
	0x602A, 0x35C0,
	0x6F12, 0x0000,
	0x6F12, 0x0600,
	0x602A, 0x3614,
	0x6F12, 0x44DE,
	0x6F12, 0x00AE,
	0x6F12, 0xC000,
	0xF446, 0x01FF,
	0xF448, 0x00FF,
	0x602A, 0x36C8,
	0x6F12, 0x0080,
	0x602A, 0x24D4,
	0x6F12, 0x002B,
	0x602A, 0x24DC,
	0x6F12, 0x0817,
	0x602A, 0x24E4,
	0x6F12, 0x0836,
	0x602A, 0x24EC,
	0x6F12, 0x0836,
	0x602A, 0x24F4,
	0x6F12, 0x002B,
	0x602A, 0x24FC,
	0x6F12, 0x0817,
	0x602A, 0x2504,
	0x6F12, 0x0836,
	0x602A, 0x250C,
	0x6F12, 0x0836,
	0x602A, 0x35D0,
	0x6F12, 0xFFEA,
	0x602A, 0x279C,
	0x6F12, 0x0057,
	0x602A, 0x23B4,
	0x6F12, 0x0110,
	0x602A, 0x23BC,
	0x6F12, 0x00F8,
	0x602A, 0x35D4,
	0x6F12, 0x000F,
	0x6028, 0x4000,
	0x602A, 0x081E,
	0x6F12, 0x0900,
	0x6B5C, 0xE222,
	0x6B5E, 0x00FF,
	0x6B76, 0xE000,
	0x6028, 0x2000,
	0x602A, 0x2BA2,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,

	/* Convert from : "gw1_5M_2592x1940_30fps_MIPI534mbps.sset"*/


	/*$MV1[MCLK:24,Width:2592,Height:1940,Format:MIPI_RAW10,mipi_lane:4*/
	/*,mipi_datarate:534,pvi_pclk_inverse:0]*/

	/* ExtClk :	24	MHz*/
	/* Vt_pix_clk :	688	MHz*/
	/* MIPI_output_speed :	534	Mbps/lane*/
	/* Crop_Width :	5200	px*/
	/* Crop_Height :	3880	px*/
	/* Output_Width :	2592	px*/
	/* Output_Height :	1940	px*/
	/* Frame rate :	30.02	fps*/
	/* Output format :	Raw10*/
	/* H-size :	9008	px*/
	/* H-blank :	6416	px*/
	/* V-size :	2544	line*/
	/* V-blank :	604	line*/
	/* Lane :	4	lane*/
	/* First Pixel :	Gr	First*/

	0x0110, 0x1002,
	0x0114, 0x0201,
	0x011C, 0x0101,
	0x0344, 0x0000,
	0x0346, 0x0000,
	0x0348, 0x243F,
	0x034A, 0x1B1F,
	0x034C, 0x1220,
	0x034E, 0x0D90,

	//0x0380, 0x0002,
	//0x0382, 0x0002,

	0x0380, 0x0001,
	0x0382, 0x0001,

	0x0384, 0x0002,
	0x0386, 0x0002,
	//0x0900, 0x2222,
	//0x040C, 0x0000,

	0x0900, 0x0212,
	0x040C, 0x1000,

	0x0404, 0x1000,
	0x0408, 0x0100,
	0x040A, 0x0100,
	//0x0400, 0x1010,

	0x0400, 0x2010,

	0x0304, 0x0004,
	0x030C, 0x0000,
	0x0306, 0x00A0,
	0x0302, 0x0001,
	0x0300, 0x0004,
	0x030E, 0x0004,
	0x0312, 0x0001,
	0x0310, 0x0100,//0x0100
	0x030A, 0x0001,
	0x0308, 0x0008,
	0x0342, 0x3010,
	0x0340, 0x1450,
	0x021E, 0x0000,
	/*
	0x0D00, 0x0100,
	0x0D02, 0x0001,
	*/
	0x0D00, 0x0101,
	0x0D02, 0x0001,
	0x0114, 0x0200,

	//0x0114, 0x0201,
	0x0B06, 0x0101,
	0x0FEA, 0x2980,
	0x602A, 0x20FC,
	//0x6F12, 0x0000,
	0x6F12, 0x0001,

	0x6F12, 0x0001,
	0x6028, 0x2001,
	0x602A, 0xD20C,
	//0x6F12, 0x0104,
	0x6F12, 0x0108,

	0x6F12, 0x0800,
	0x6F12, 0x0000,

	/*
	0x6F12, 0x4940,
	0x6F12, 0x0201,
	0x6F12, 0x4301,
	0x6F12, 0x0006,
	0x6F12, 0x4106,
	0x6F12, 0x0202,
	0x6F12, 0x4302,
	0x6F12, 0x0005,
	0x6F12, 0x4105,
	*/
	0x6F12, 0x9280,
	0x6F12, 0x0501,
	0x6F12, 0x4701,
	0x6F12, 0x0106,
	0x6F12, 0x4306,
	0x6F12, 0x0502,
	0x6F12, 0x4702,
	0x6F12, 0x0105,
	0x6F12, 0x4305,

	0x6F12, 0x0004,
	0x6F12, 0x0002,
	0x6F12, 0x0000,
	0x6F12, 0x0002,
	0x602A, 0x6FE0,
	0x6F12, 0x0101,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x578E,
	0x6F12, 0x0200,
	0x602A, 0x1FDA,
	0x6F12, 0x0A00,
	0x0D06, 0x0910,
	0x0D08, 0x0364,
	0x602A, 0x57FE,
	//0x6F12, 0x010F,
	0x6F12, 0x010C,

	0x6028, 0x2001,
	0x602A, 0xD22C,
	0x6F12, 0x0000,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0200,
	0x6F12, 0x0001,
	0x6F12, 0x0008,
	0x6F12, 0x0002,
	0x6F12, 0x0010,
	0x6028, 0x2000,
	0x602A, 0x223E,
	0x6F12, 0x0303,
	0x6028, 0x2001,
	0x602A, 0xD268,
	0x6F12, 0x0001,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x04D7,
	0x6F12, 0x0420,
	0x6F12, 0x039E,
	0x6F12, 0x0323,
	0x6F12, 0x02BE,
	0x6F12, 0x026F,
	0x6F12, 0x0230,
	0x6F12, 0x01E6,
	0x6F12, 0x01B5,
	0x6F12, 0x018E,
	0x6F12, 0x016F,
	0x6F12, 0x0159,
	0x6F12, 0x0148,
	0x6F12, 0x013A,
	0x6F12, 0x012F,
	0x6F12, 0x0125,
	0x6F12, 0x011D,
	0x6F12, 0x0116,
	0x6F12, 0x0111,
	0x6F12, 0x010C,
	0x6F12, 0x0109,
	0x6F12, 0x0107,
	0x6F12, 0x0105,
	0x6F12, 0x0103,
	0x6F12, 0x0100,
	0x6F12, 0x0103,
	0x6F12, 0x0101,
	0x6F12, 0x0100,
	0x6028, 0x2000,
	0x602A, 0x4EF6,
	0x6F12, 0x060D,
	0x0D80, 0x1388,
	0x0FE8, 0x3600,
	0x6028, 0x2001,
	0x602A, 0xD2AA,
	0x6F12, 0x0042,
	0x602A, 0xD2AC,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x5B60,
	0x6F12, 0x0100,
	0x602A, 0xF7CC,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x4018,
	0x6F12, 0x0000,
	0x6028, 0x2001,
	0x602A, 0xF7CE,
	0x6F12, 0x0005,
	0x6F12, 0x00FD,
	0x6F12, 0x055C,
	0x6F12, 0xFF47,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xFF45,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x30BE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xC059,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x00EE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x3C52,
	0x6F12, 0x0002,
	0x6F12, 0x0203,

	0x6214, 0xF9F0,
	0x6218, 0xF9F0,
	//0x0100, 0x0100
};

static void preview_setting(void)
{
	pr_debug("%s E\n", __func__);

/*
 * /  write_cmos_sensor(0x6028, 0x4000);
 *    write_cmos_sensor_8(0x0100, 0x00);
 *    if (currefps == 150){
 *	 Convert from : "Init.txt"
 *	 No setfile ready yet    } else if (currefps == 240){
 *	 Convert from : "Init.txt"
 *
 *
 *	No setfile ready yet    } else {	//30fps
 *	Convert from : "gw1_20M_5184x3880_30fps_MIPI1680mbps.sset"
 *
 *
 *	$MV1[MCLK:24,Width:5184,Height:3880,Format:MIPI_RAW10,mipi_lane:4
 *         ,mipi_datarate:1680,pvi_pclk_inverse:0]
 *	 ExtClk :	24	MHz
 *	 Vt_pix_clk :	678.4	MHz
 *	 MIPI_output_speed :	1680	Mbps/lane
 *	 Crop_Width :	5184	px
 *	 Crop_Height :	3880	px
 *	 Output_Width :	5184	px
 *	 Output_Height :	3880	px
 *	 Frame rate :	30.01	fps
 *	 Output format :	Raw10
 *	 H-size :	5640	px
 *	 H-blank :	456	px
 *	 V-size :	4008	line
 *	 V-blank :	128	line
 *	 Lane :	4	lane
 *	 First Pixel :	Gr	First
 */
	pr_debug("[%s] +", __func__);
	table_write_cmos_sensor(addr_data_pair_pre_gw1,
			sizeof(addr_data_pair_pre_gw1) / sizeof(kal_uint16));
	pr_debug("[%s] -", __func__);

}

static kal_uint16 addr_data_pair_cap_gw1[] = {
	0x6028, 0x2000,
	0x602A, 0x3608,
	0x6F12, 0x1FFF,
	0x6F12, 0x1FFF,
	0x602A, 0x35CC,
	0x6F12, 0x3B1F,
	0x6F12, 0xFFFC,
	0x602A, 0x36D8,
	0x6F12, 0x000A,
	0x602A, 0x36DC,
	0x6F12, 0x000F,
	0x6F12, 0x000F,
	0x602A, 0x36DA,
	0x6F12, 0x0018,
	0x602A, 0x36E2,
	0x6F12, 0x0011,
	0x602A, 0x35C4,
	0x6F12, 0x0808,
	0x602A, 0x229C,
	0x6F12, 0x0009,
	0x602A, 0x35C0,
	0x6F12, 0x0000,
	0x6F12, 0x0600,
	0x602A, 0x3614,
	0x6F12, 0x44DE,
	0x6F12, 0x00AE,
	0x6F12, 0xC000,
	0xF446, 0x01FF,
	0xF448, 0x00FF,
	0x602A, 0x36C8,
	0x6F12, 0x0080,
	0x602A, 0x24D4,
	0x6F12, 0x002B,
	0x602A, 0x24DC,
	0x6F12, 0x0817,
	0x602A, 0x24E4,
	0x6F12, 0x0836,
	0x602A, 0x24EC,
	0x6F12, 0x0836,
	0x602A, 0x24F4,
	0x6F12, 0x002B,
	0x602A, 0x24FC,
	0x6F12, 0x0817,
	0x602A, 0x2504,
	0x6F12, 0x0836,
	0x602A, 0x250C,
	0x6F12, 0x0836,
	0x602A, 0x35D0,
	0x6F12, 0xFFEA,
	0x602A, 0x279C,
	0x6F12, 0x0057,
	0x602A, 0x23B4,
	0x6F12, 0x0110,
	0x602A, 0x23BC,
	0x6F12, 0x00F8,
	0x602A, 0x35D4,
	0x6F12, 0x000F,
	0x6028, 0x4000,
	0x602A, 0x081E,
	0x6F12, 0x0900,
	0x6B5C, 0xE222,
	0x6B5E, 0x00FF,
	0x6B76, 0xE000,
	0x6028, 0x2000,
	0x602A, 0x2BA2,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x0110, 0x1002,
	0x0114, 0x0201,
	0x011C, 0x0101,
	0x0344, 0x0000,
	0x0346, 0x0000,
	0x0348, 0x243F,
	0x034A, 0x1B1F,
	0x034C, 0x2440,
	0x034E, 0x1B20,
	0x0380, 0x0001,
	0x0382, 0x0001,
	0x0384, 0x0001,
	0x0386, 0x0001,
	0x0900, 0x0011,
	0x040C, 0x0000,
	0x0404, 0x1000,
	0x0408, 0x0100,
	0x040A, 0x0100,
	0x0400, 0x1010,
	0x0304, 0x0004,
	0x030C, 0x0000,
	0x0306, 0x00A0,
	0x0302, 0x0001,
	0x0300, 0x0004,
	0x030E, 0x0004,
	0x0312, 0x0000,
	0x0310, 0x00C0,
	0x030A, 0x0001,
	0x0308, 0x0008,
	0x0342, 0x346A,
	0x0340, 0x2530,
	0x021E, 0x0000,
	0x0D00, 0x0101,
	0x0D02, 0x0001,
	0x0114, 0x0200,
	0x0B06, 0x0101,
	0x0FEA, 0x2980,
	0x602A, 0x20FC,
	0x6F12, 0x0003,
	0x6F12, 0x0003,
	0x6028, 0x2001,
	0x602A, 0xD20C,
	0x6F12, 0x0008,
	0x6F12, 0x1000,
	0x6F12, 0x0000,

	/*
	0x6F12, 0x4940,
	0x6F12, 0x0201,
	0x6F12, 0x4301,
	0x6F12, 0x0006,
	0x6F12, 0x4106,
	0x6F12, 0x0202,
	0x6F12, 0x4302,
	0x6F12, 0x0005,
	0x6F12, 0x4105,
	*/
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0004,
	0x6F12, 0x0002,
	0x6F12, 0x0000,
	0x6F12, 0x0002,
	0x602A, 0x6FE0,
	0x6F12, 0x0101,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x1FDA,
	0x6F12, 0x0A00,
	0x0D06, 0x0910,
	0x0D08, 0x0364,
	0x602A, 0x57FE,
	0x6F12, 0x0000,
	0x6028, 0x2001,
	0x602A, 0xD22C,
	0x6F12, 0x0000,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0200,
	0x6F12, 0x0001,
	0x6F12, 0x0008,
	0x6F12, 0x0002,
	0x6F12, 0x0010,
	0x6028, 0x2000,
	0x602A, 0x223E,
	0x6F12, 0x0303,
	0x6028, 0x2001,
	0x602A, 0xD268,
	0x6F12, 0x0001,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x04D7,
	0x6F12, 0x0420,
	0x6F12, 0x039E,
	0x6F12, 0x0323,
	0x6F12, 0x02BE,
	0x6F12, 0x026F,
	0x6F12, 0x0230,
	0x6F12, 0x01E6,
	0x6F12, 0x01B5,
	0x6F12, 0x018E,
	0x6F12, 0x016F,
	0x6F12, 0x0159,
	0x6F12, 0x0148,
	0x6F12, 0x013A,
	0x6F12, 0x012F,
	0x6F12, 0x0125,
	0x6F12, 0x011D,
	0x6F12, 0x0116,
	0x6F12, 0x0111,
	0x6F12, 0x010C,
	0x6F12, 0x0109,
	0x6F12, 0x0107,
	0x6F12, 0x0105,
	0x6F12, 0x0103,
	0x6F12, 0x0100,
	0x6F12, 0x0103,
	0x6F12, 0x0101,
	0x6F12, 0x0100,
	0x6028, 0x2000,
	0x602A, 0x4EF6,
	0x6F12, 0x060D,
	0x0D80, 0x1388,
	0x0FE8, 0x3600,
	0x6028, 0x2001,
	0x602A, 0xD2AA,
	0x6F12, 0x0042,
	0x602A, 0xD2AC,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x5B60,
	0x6F12, 0x0100,
	0x602A, 0xF7CC,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x4018,
	0x6F12, 0x0000,
	0x6028, 0x2001,
	0x602A, 0xF7CE,
	0x6F12, 0x0005,
	0x6F12, 0x00FD,
	0x6F12, 0x035C,
	0x6F12, 0xFF47,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xFF45,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x30BE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xC059,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x00EE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6214, 0xF9F0,
	0x6218, 0xF9F0,
	//0x0100, 0x0100
};

static void capture_setting(kal_uint16 currefps)
{
	pr_debug("%s E! currefps:%d\n", __func__, currefps);

	sensor_init();

	pr_debug("[%s] +", __func__);
	table_write_cmos_sensor(addr_data_pair_cap_gw1,
			sizeof(addr_data_pair_cap_gw1) / sizeof(kal_uint16));
	pr_debug("[%s] -", __func__);
}

static kal_uint16 addr_data_pair_video_gw1[] = {
	0x6028, 0x2000,
	0x602A, 0x3608,
	0x6F12, 0x1FFF,
	0x6F12, 0x1FFF,
	0x602A, 0x35CC,
	0x6F12, 0x3B1F,
	0x6F12, 0xFFFC,
	0x602A, 0x36D8,
	0x6F12, 0x000A,
	0x602A, 0x36DC,
	0x6F12, 0x000F,
	0x6F12, 0x000F,
	0x602A, 0x36DA,
	0x6F12, 0x0018,
	0x602A, 0x36E2,
	0x6F12, 0x0011,
	0x602A, 0x35C4,
	0x6F12, 0x5008,
	0x602A, 0x229C,
	0x6F12, 0x0009,
	0x602A, 0x35C0,
	0x6F12, 0x0000,
	0x6F12, 0x0600,
	0x602A, 0x3614,
	0x6F12, 0x44DE,
	0x6F12, 0x00AE,
	0x6F12, 0xC000,
	0xF446, 0x01FF,
	0xF448, 0x00FF,
	0x602A, 0x36C8,
	0x6F12, 0x0080,
	0x602A, 0x24D4,
	0x6F12, 0x002B,
	0x602A, 0x24DC,
	0x6F12, 0x0817,
	0x602A, 0x24E4,
	0x6F12, 0x0836,
	0x602A, 0x24EC,
	0x6F12, 0x0836,
	0x602A, 0x24F4,
	0x6F12, 0x002B,
	0x602A, 0x24FC,
	0x6F12, 0x0817,
	0x602A, 0x2504,
	0x6F12, 0x0836,
	0x602A, 0x250C,
	0x6F12, 0x0836,
	0x602A, 0x35D0,
	0x6F12, 0xFFEA,
	0x602A, 0x279C,
	0x6F12, 0x0057,
	0x602A, 0x23B4,
	0x6F12, 0x0110,
	0x602A, 0x23BC,
	0x6F12, 0x00F8,
	0x602A, 0x35D4,
	0x6F12, 0x000F,
	0x6028, 0x4000,
	0x602A, 0x081E,
	0x6F12, 0x0900,
	0x6B5C, 0xE222,
	0x6B5E, 0x00FF,
	0x6B76, 0xE000,
	0x6028, 0x2000,
	0x602A, 0x2BA2,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x0110, 0x1002,
	0x0114, 0x0201,
	0x011C, 0x0101,
	0x0344, 0x0000,
	0x0346, 0x0000,
	0x0348, 0x243F,
	0x034A, 0x1B1F,
	0x034C, 0x1220,
	0x034E, 0x0D90,

	//0x0380, 0x0002,
	//0x0382, 0x0002,

	0x0380, 0x0001,
	0x0382, 0x0001,

	0x0384, 0x0002,
	0x0386, 0x0002,
	//0x0900, 0x2222,
	//0x040C, 0x0000,

	0x0900, 0x0212,
	0x040C, 0x1000,

	0x0404, 0x1000,
	0x0408, 0x0100,
	0x040A, 0x0100,
	//0x0400, 0x1010,

	0x0400, 0x2010,

	0x0304, 0x0004,
	0x030C, 0x0000,
	0x0306, 0x00A0,
	0x0302, 0x0001,
	0x0300, 0x0004,
	0x030E, 0x0004,
	0x0312, 0x0001,
	0x0310, 0x0100,//0x0100
	0x030A, 0x0001,
	0x0308, 0x0008,
	0x0342, 0x3010,
	0x0340, 0x1450,
	0x021E, 0x0000,
	/*
	0x0D00, 0x0100,
	0x0D02, 0x0001,
	*/
	0x0D00, 0x0101,
	0x0D02, 0x0001,
	0x0114, 0x0200,

	//0x0114, 0x0201,
	0x0B06, 0x0101,
	0x0FEA, 0x2980,
	0x602A, 0x20FC,
	//0x6F12, 0x0000,
	0x6F12, 0x0001,

	0x6F12, 0x0001,
	0x6028, 0x2001,
	0x602A, 0xD20C,
	//0x6F12, 0x0104,
	0x6F12, 0x0108,

	0x6F12, 0x0800,
	0x6F12, 0x0000,
	/*
	0x6F12, 0x4940,
	0x6F12, 0x0201,
	0x6F12, 0x4301,
	0x6F12, 0x0006,
	0x6F12, 0x4106,
	0x6F12, 0x0202,
	0x6F12, 0x4302,
	0x6F12, 0x0005,
	0x6F12, 0x4105,
	*/
	0x6F12, 0x9280,
	0x6F12, 0x0501,
	0x6F12, 0x4701,
	0x6F12, 0x0106,
	0x6F12, 0x4306,
	0x6F12, 0x0502,
	0x6F12, 0x4702,
	0x6F12, 0x0105,
	0x6F12, 0x4305,

	0x6F12, 0x0004,
	0x6F12, 0x0002,
	0x6F12, 0x0000,
	0x6F12, 0x0002,
	0x602A, 0x6FE0,
	0x6F12, 0x0101,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x578E,
	0x6F12, 0x0200,
	0x602A, 0x1FDA,
	0x6F12, 0x0A00,
	0x0D06, 0x0910,
	0x0D08, 0x0364,
	0x602A, 0x57FE,
	//0x6F12, 0x010F,
	0x6F12, 0x010C,

	0x6028, 0x2001,
	0x602A, 0xD22C,
	0x6F12, 0x0000,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0200,
	0x6F12, 0x0001,
	0x6F12, 0x0008,
	0x6F12, 0x0002,
	0x6F12, 0x0010,
	0x6028, 0x2000,
	0x602A, 0x223E,
	0x6F12, 0x0303,
	0x6028, 0x2001,
	0x602A, 0xD268,
	0x6F12, 0x0001,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x04D7,
	0x6F12, 0x0420,
	0x6F12, 0x039E,
	0x6F12, 0x0323,
	0x6F12, 0x02BE,
	0x6F12, 0x026F,
	0x6F12, 0x0230,
	0x6F12, 0x01E6,
	0x6F12, 0x01B5,
	0x6F12, 0x018E,
	0x6F12, 0x016F,
	0x6F12, 0x0159,
	0x6F12, 0x0148,
	0x6F12, 0x013A,
	0x6F12, 0x012F,
	0x6F12, 0x0125,
	0x6F12, 0x011D,
	0x6F12, 0x0116,
	0x6F12, 0x0111,
	0x6F12, 0x010C,
	0x6F12, 0x0109,
	0x6F12, 0x0107,
	0x6F12, 0x0105,
	0x6F12, 0x0103,
	0x6F12, 0x0100,
	0x6F12, 0x0103,
	0x6F12, 0x0101,
	0x6F12, 0x0100,
	0x6028, 0x2000,
	0x602A, 0x4EF6,
	0x6F12, 0x060D,
	0x0D80, 0x1388,
	0x0FE8, 0x3600,
	0x6028, 0x2001,
	0x602A, 0xD2AA,
	0x6F12, 0x0042,
	0x602A, 0xD2AC,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x5B60,
	0x6F12, 0x0100,
	0x602A, 0xF7CC,
	0x6F12, 0x0000,
	0x6028, 0x2000,
	0x602A, 0x4018,
	0x6F12, 0x0000,
	0x6028, 0x2001,
	0x602A, 0xF7CE,
	0x6F12, 0x0005,
	0x6F12, 0x00FD,
	0x6F12, 0x055C,
	0x6F12, 0xFF47,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xFF45,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x30BE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xC059,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x00EE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,

	0x6028, 0x2000,
	0x602A, 0x3C52,
	0x6F12, 0x0002,
	0x6F12, 0x0203,

	0x6214, 0xF9F0,
	0x6218, 0xF9F0,
	//0x0100, 0x0100
};

static void normal_video_setting(kal_uint16 currefps)
{
	pr_debug("%s E! currefps:%d\n", __func__, currefps);

	pr_debug("[%s] +", __func__);
	/*Convert from : "gw1_20M_5184x3880_30fps_MIPI1680mbps.sset"*/

	/*Format:MIPI_RAW10,mipi_lane:4,mipi_datarate:1680,pvi_pclk_inverse:0]
	 */
	/*
	 * ExtClk :	24	MHz
	 * Vt_pix_clk :	678.4	MHz
	 * MIPI_output_speed :	1680	Mbps/lane
	 * Crop_Width :	5184	px
	 * Crop_Height :	3880	px
	 * Output_Width :	5184	px
	 * Output_Height :	3880	px
	 * Frame rate :	30.01	fps
	 * Output format :	Raw10
	 * H-size :	5640	px
	 * H-blank :	456	px
	 * V-size :	4008	line
	 * V-blank :	128	line
	 * Lane :	4	lane
	 * First Pixel :	Gr	First
	 */

	table_write_cmos_sensor(addr_data_pair_video_gw1,
		sizeof(addr_data_pair_video_gw1) / sizeof(kal_uint16));

	//	table_write_cmos_sensor(addr_data_pair_pre_gw1,
	//		sizeof(addr_data_pair_pre_gw1) / sizeof(kal_uint16));


	pr_debug("[%s] -", __func__);
}

static kal_uint16 addr_data_pair_hs_gw1[] = {
	0x6028, 0x2000,
	0x602A, 0x3614,
	0x6F12, 0x44DE,
	0x6F12, 0x00AE,
	0x6F12, 0xC000,
	0xF446, 0x01FF,
	0xF448, 0x00FF,
	0x602A, 0x36C8,
	0x6F12, 0x0080,
	0x602A, 0x24D4,
	0x6F12, 0x002B,
	0x602A, 0x24DC,
	0x6F12, 0x0817,
	0x602A, 0x24E4,
	0x6F12, 0x0836,
	0x602A, 0x24EC,
	0x6F12, 0x0836,
	0x602A, 0x24F4,
	0x6F12, 0x002B,
	0x602A, 0x24FC,
	0x6F12, 0x0817,
	0x602A, 0x2504,
	0x6F12, 0x0836,
	0x602A, 0x250C,
	0x6F12, 0x0836,
	0x602A, 0x35D0,
	0x6F12, 0xFFEA,
	0x602A, 0x279C,
	0x6F12, 0x0057,
	0x602A, 0x23B4,
	0x6F12, 0x0110,
	0x602A, 0x23BC,
	0x6F12, 0x00F8,
	0x602A, 0x2BA2,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x602A, 0x35E8,
	0x6F12, 0x0060,
	0x6F12, 0x0061,
	0x6F12, 0x0070,
	0x6F12, 0x0071,
	0x602A, 0x3608,
	0x6F12, 0x1FFF,
	0x6F12, 0x1FFF,
	0x602A, 0x35D4,
	0x6F12, 0x000F,
	0x602A, 0x35CC,
	0x6F12, 0x3B1F,
	0x6F12, 0xFFFC,
	0x602A, 0x36D8,
	0x6F12, 0x000A,
	0x602A, 0x36DC,
	0x6F12, 0x000F,
	0x6F12, 0x000F,
	0x602A, 0x36DA,
	0x6F12, 0x0018,
	0x602A, 0x36E2,
	0x6F12, 0x0011,
	0x602A, 0x35C4,
	0x6F12, 0x5008,
	0x602A, 0x229C,
	0x6F12, 0x0009,
	0x602A, 0x35C0,
	0x6F12, 0x0000,
	0x6F12, 0x0600,
	0x0110, 0x1002,
	0x0114, 0x0200,
	0x011C, 0x0101,
	0x0344, 0x0320,
	0x0346, 0x0520,
	0x0348, 0x211F,
	0x034A, 0x15FF,
	0x034C, 0x0780,
	0x034E, 0x0438,
	0x0380, 0x0002,
	0x0382, 0x0006,
	0x0384, 0x0002,
	0x0386, 0x0006,
	0x0900, 0x3344,
	0x040C, 0x0000,
	0x0404, 0x1000,
	0x0408, 0x0100,
	0x040A, 0x0100,
	0x0400, 0x1010,
	0x0304, 0x0004,
	0x030C, 0x0000,
	0x0306, 0x00A0,
	0x0302, 0x0001,
	0x0300, 0x0004,
	0x030E, 0x0004,
	0x0312, 0x0001,
	0x0310, 0x0171,
	0x030A, 0x0001,
	0x0308, 0x0008,
	0x0342, 0x0D10,
	0x0340, 0x0950,
	0x021E, 0x0000,
	0x0D00, 0x0000,
	0x0D02, 0x0001,
	0x0114, 0x0200,
	0x0B06, 0x0101,
	0x0FEA, 0x2980,
	0x602A, 0x20FC,
	0x6F12, 0x0000,
	0x6F12, 0x0001,
	0x6028, 0x2001,
	0x602A, 0xD20C,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0200,
	0x6F12, 0x0001,
	0x6F12, 0x0008,
	0x6F12, 0x0002,
	0x6F12, 0x0010,
	0x6028, 0x2000,
	0x602A, 0x223E,
	0x6F12, 0x0303,
	0x6028, 0x2001,
	0x602A, 0xD268,
	0x6F12, 0x0001,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x04D7,
	0x6F12, 0x0420,
	0x6F12, 0x039E,
	0x6F12, 0x0323,
	0x6F12, 0x02BE,
	0x6F12, 0x026F,
	0x6F12, 0x0230,
	0x6F12, 0x01E6,
	0x6F12, 0x01B5,
	0x6F12, 0x018E,
	0x6F12, 0x016F,
	0x6F12, 0x0159,
	0x6F12, 0x0148,
	0x6F12, 0x013A,
	0x6F12, 0x012F,
	0x6F12, 0x0125,
	0x6F12, 0x011D,
	0x6F12, 0x0116,
	0x6F12, 0x0111,
	0x6F12, 0x010C,
	0x6F12, 0x0109,
	0x6F12, 0x0107,
	0x6F12, 0x0105,
	0x6F12, 0x0103,
	0x6F12, 0x0100,
	0x6F12, 0x0103,
	0x6F12, 0x0101,
	0x6F12, 0x0100,
	0x6028, 0x2000,
	0x602A, 0x4EF6,
	0x6F12, 0x060D,
	0x0D80, 0x1388,
	0x0FE8, 0x3600,
	0x6028, 0x2001,
	0x602A, 0xD2AA,
	0x6F12, 0x0042,
	0x602A, 0xD2AC,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x602A, 0xF7CC,
	0x6F12, 0x0000,
	0x081E, 0x0A00,
	0x6B5C, 0xE222,
	0x6B5E, 0x00FF,
	0x6B76, 0xE000,
	0x6214, 0xF9F0,
	0x6218, 0xF9F0,

};

static void hs_video_setting(void)
{
	pr_debug("%s E\n", __func__);


	/*//VGA 120fps*/

	/*// Convert from : "Init.txt"*/
	/*check_streamoff();*/
	table_write_cmos_sensor(addr_data_pair_hs_gw1,
			sizeof(addr_data_pair_hs_gw1) / sizeof(kal_uint16));
}

static kal_uint16 addr_data_pair_slim_gw1[] = {
};

static void slim_video_setting(void)
{
	pr_debug("%s E\n", __func__);
	/* 1080p 60fps */

	/* Convert from : "Init.txt"*/

	table_write_cmos_sensor(addr_data_pair_slim_gw1,
		sizeof(addr_data_pair_slim_gw1) / sizeof(kal_uint16));

}

static kal_uint16 addr_data_pair_custom1_gw1[] = {

	0x6028, 0x2000,
	0x602A, 0x35E8,
	0x6F12, 0x0060,
	0x6F12, 0x0061,
	0x6F12, 0x0070,
	0x6F12, 0x0071,
	0x6028, 0x2000,
	0x602A, 0x3608,
	0x6F12, 0x1FFF,
	0x6F12, 0x1FFF,

	0x602A, 0x35CC,
	0x6F12, 0x3B1F,
	0x6F12, 0xFFFC,
	0x602A, 0x36D8,
	0x6F12, 0x000A,
	0x602A, 0x36DC,
	0x6F12, 0x000F,
	0x6F12, 0x000F,
	0x602A, 0x36DA,
	0x6F12, 0x0018,
	0x602A, 0x36E2,
	0x6F12, 0x0011,

	0x602A, 0x35C4,
	0x6F12, 0x5008,
	0x602A, 0x229C,
	0x6F12, 0x0009,

	0x602A, 0x35C0,
	0x6F12, 0x0000,
	0x6F12, 0x0600,

	0x602A, 0x3614,
	0x6F12, 0x44DE,
	0x6F12, 0x00AE,
	0x6F12, 0xC000,
	0xF446, 0x01FF,
	0xF448, 0x00FF,
	0x602A, 0x36C8,
	0x6F12, 0x0080,
	0x602A, 0x24D4,
	0x6F12, 0x002B,
	0x602A, 0x24DC,
	0x6F12, 0x0817,
	0x602A, 0x24E4,
	0x6F12, 0x0836,
	0x602A, 0x24EC,
	0x6F12, 0x0836,
	0x602A, 0x24F4,
	0x6F12, 0x002B,
	0x602A, 0x24FC,
	0x6F12, 0x0817,
	0x602A, 0x2504,
	0x6F12, 0x0836,
	0x602A, 0x250C,
	0x6F12, 0x0836,
	0x602A, 0x35D0,
	0x6F12, 0xFFEA,
	0x602A, 0x279C,
	0x6F12, 0x0057,
	0x602A, 0x23B4,
	0x6F12, 0x0110,
	0x602A, 0x23BC,
	0x6F12, 0x00F8,
	0x602A, 0x35D4,
	0x6F12, 0x000F,

	0x6028, 0x4000,
	0x602A, 0x081E,
	0x6F12, 0x0900,
	0x6B5C, 0xE222,
	0x6B5E, 0x00FF,
	0x6B76, 0xE000,
	0x6028, 0x2000,
	0x602A, 0x2BA2,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8001,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,
	0x6F12, 0x8030,

	0x0110, 0x1002,
	0x0114, 0x0201,
	0x011C, 0x0101,
	0x0344, 0x0320,
	0x0346, 0x0520,
	0x0348, 0x211F,
	0x034A, 0x15FF,
	0x034C, 0x0780,
	0x034E, 0x0438,
	0x0380, 0x0002,
	0x0382, 0x0006,
	0x0384, 0x0002,
	0x0386, 0x0006,
	0x0900, 0x3344,
	0x040C, 0x0000,
	0x0404, 0x1000,
	0x0408, 0x0100,
	0x040A, 0x0100,
	0x0400, 0x1010,

	0x0304, 0x0004,
	0x030C, 0x0000,
	0x0306, 0x00A0,
	0x0302, 0x0001,
	0x0300, 0x0004,
	0x030E, 0x0004,
	0x0312, 0x0001,
	0x0310, 0x0171,
	0x030A, 0x0001,
	0x0308, 0x0008,

	0x0342, 0x1E80,
	0x0340, 0x07FA,
	0x021E, 0x0000,
	0x0D00, 0x0000,
	0x0D02, 0x0001,
	0x0114, 0x0200,
	0x0B06, 0x0101,
	0x0FEA, 0x2980,
	0x602A, 0x20FC,
	0x6F12, 0x0000,
	0x6F12, 0x0001,

	0x6028, 0x2001,
	0x602A, 0xD20C,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,
	0x6F12, 0x0000,

	0x6028, 0x2001,
	0x602A, 0xD22C,
	0x6F12, 0x0000,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0096,
	0x6F12, 0x004B,
	0x6F12, 0x0200,
	0x6F12, 0x0001,
	0x6F12, 0x0008,
	0x6F12, 0x0002,
	0x6F12, 0x0010,

	0x6028, 0x2000,
	0x602A, 0x223E,
	0x6F12, 0x0303,

	0x6028, 0x2001,
	0x602A, 0xD268,
	0x6F12, 0x0001,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x0800,
	0x6F12, 0x04D7,
	0x6F12, 0x0420,
	0x6F12, 0x039E,
	0x6F12, 0x0323,
	0x6F12, 0x02BE,
	0x6F12, 0x026F,
	0x6F12, 0x0230,
	0x6F12, 0x01E6,
	0x6F12, 0x01B5,
	0x6F12, 0x018E,
	0x6F12, 0x016F,
	0x6F12, 0x0159,
	0x6F12, 0x0148,
	0x6F12, 0x013A,
	0x6F12, 0x012F,
	0x6F12, 0x0125,
	0x6F12, 0x011D,
	0x6F12, 0x0116,
	0x6F12, 0x0111,
	0x6F12, 0x010C,
	0x6F12, 0x0109,
	0x6F12, 0x0107,
	0x6F12, 0x0105,
	0x6F12, 0x0103,
	0x6F12, 0x0100,
	0x6F12, 0x0103,
	0x6F12, 0x0101,
	0x6F12, 0x0100,

	0x6028, 0x2000,
	0x602A, 0x4EF6,
	0x6F12, 0x060D,
	0x0D80, 0x1388,
	0x0FE8, 0x3600,

	0x6028, 0x2001,
	0x602A, 0xD2AA,
	0x6F12, 0x0042,

	0x602A, 0xD2AC,
	0x6F12, 0x0000,
	0x6F12, 0x0000,

	0x6028, 0x2000,
	0x602A, 0x5B60,
	0x6F12, 0x0100,

	0x602A, 0xF7CC,
	0x6F12, 0x0000,

	0x6028, 0x2000,
	0x602A, 0x4018,
	0x6F12, 0x0000,
	0x6028, 0x2001,
	0x602A, 0xF7CE,
	0x6F12, 0x0005,
	0x6F12, 0x00FD,
	0x6F12, 0x055C,
	0x6F12, 0xFF47,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xFF45,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x30BE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0xC059,
	0x6F12, 0x2000,
	0x6F12, 0x0000,
	0x6F12, 0x00EE,
	0x6F12, 0x2000,
	0x6F12, 0x0000,

	0x6214, 0xF9F0,
	0x6218, 0xF9F0,

};

static void custom1_setting(void)
{
	pr_debug("%s E\n", __func__);

  // sensor_init();
	table_write_cmos_sensor(addr_data_pair_custom1_gw1,
		sizeof(addr_data_pair_custom1_gw1) / sizeof(kal_uint16));

}

/*************************************************************************
 * FUNCTION
 *	get_imgsensor_id
 *
 * DESCRIPTION
 *	This function get the sensor ID
 *
 * PARAMETERS
 *	*sensorID : return the sensor ID
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static kal_uint32 get_imgsensor_id(UINT32 *sensor_id)
{
	kal_uint8 i = 0;
	kal_uint8 retry = 2;
	//	kal_uint16 sp8spFlag = 0;

	/* sensor have two i2c address 0x6c 0x6d & 0x21 0x20,
	 *we should detect the module used i2c address
	 */
	while (imgsensor_info.i2c_addr_table[i] != 0xff) {
		spin_lock(&imgsensor_drv_lock);
		imgsensor.i2c_write_id = imgsensor_info.i2c_addr_table[i];
		printk("braddbg now slave is 0x%x", imgsensor.i2c_write_id);
		spin_unlock(&imgsensor_drv_lock);
		do {
			*sensor_id = return_sensor_id();

			if (*sensor_id == imgsensor_info.sensor_id) {
				pr_debug("i2c write id: 0x%x, sensor id: 0x%x\n",
					imgsensor.i2c_write_id, *sensor_id);
				return ERROR_NONE;

		/* 4Cell version check, 2T7 And 2T7's checking is differet
		 *	sp8spFlag = (((read_cmos_sensor(0x000C) & 0xFF) << 8)
		 *		|((read_cmos_sensor(0x000E) >> 8) & 0xFF));
		 *	pr_debug(
		 *	"sp8Flag(0x%x),0x5003 used by s5kgw1sp\n", sp8spFlag);
		 *
		 *	if (sp8spFlag == 0x5003) {
		 *		pr_debug("it is s5kgw1sp\n");
		 *		return ERROR_NONE;
		 *	}
		 *
		 *		pr_debug(
		 *	"2t7 type is 0x(%x),0x000C(0x%x),0x000E(0x%x)\n",
		 *		sp8spFlag,
		 *		read_cmos_sensor(0x000C),
		 *		read_cmos_sensor(0x000E));
		 *
		 *		*sensor_id = 0xFFFFFFFF;
		 *	return ERROR_SENSOR_CONNECT_FAIL;
		 */
			}
			pr_debug("Read sensor id fail, expected id: 0x%x read sensor id: 0x%x\n",
				imgsensor.i2c_write_id, *sensor_id);
			retry--;
		} while (retry > 0);
		i++;
		retry = 2;
	}
	if (*sensor_id != imgsensor_info.sensor_id) {
	/* if Sensor ID is not correct, Must set *sensor_id to 0xFFFFFFFF */
		*sensor_id = 0xFFFFFFFF;
		return ERROR_SENSOR_CONNECT_FAIL;
	}
	return ERROR_NONE;
}

/*************************************************************************
 * FUNCTION
 *	open
 *
 * DESCRIPTION
 *	This function initialize the registers of CMOS sensor
 *
 * PARAMETERS
 *	None
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static kal_uint32 open(void)
{
	kal_uint8 i = 0;
	kal_uint8 retry = 2;
	kal_uint16 sensor_id = 0;

	pr_debug("%s", __func__);

	/* sensor have two i2c address 0x6c 0x6d & 0x21 0x20,
	 * we should detect the module used i2c address
	 */
	while (imgsensor_info.i2c_addr_table[i] != 0xff) {
		spin_lock(&imgsensor_drv_lock);
		imgsensor.i2c_write_id = imgsensor_info.i2c_addr_table[i];
		spin_unlock(&imgsensor_drv_lock);
		do {
			sensor_id = return_sensor_id();

			if (sensor_id == imgsensor_info.sensor_id) {
				pr_debug("i2c write id: 0x%x, sensor id: 0x%x\n",
					imgsensor.i2c_write_id, sensor_id);
				break;
			}

			pr_debug("Read sensor id fail, id: 0x%x\n",
				imgsensor.i2c_write_id);
			retry--;
		} while (retry > 0);
		i++;
		if (sensor_id == imgsensor_info.sensor_id)
			break;
		retry = 2;
	}
	if (imgsensor_info.sensor_id != sensor_id)
		return ERROR_SENSOR_CONNECT_FAIL;

	/* initail sequence write in  */
	sensor_init();

	spin_lock(&imgsensor_drv_lock);

	imgsensor.autoflicker_en = KAL_FALSE;
	imgsensor.sensor_mode = IMGSENSOR_MODE_INIT;
	imgsensor.shutter = 0x3D0;
	imgsensor.gain = 0x100;
	imgsensor.pclk = imgsensor_info.pre.pclk;
	imgsensor.frame_length = imgsensor_info.pre.framelength;
	imgsensor.line_length = imgsensor_info.pre.linelength;
	imgsensor.min_frame_length = imgsensor_info.pre.framelength;
	imgsensor.dummy_pixel = 0;
	imgsensor.dummy_line = 0;
	imgsensor.ihdr_en = 0;
	imgsensor.test_pattern = KAL_FALSE;
	imgsensor.current_fps = imgsensor_info.pre.max_framerate;
	spin_unlock(&imgsensor_drv_lock);

	return ERROR_NONE;
}				/*      open  */

/*************************************************************************
 * FUNCTION
 *	close
 *
 * DESCRIPTION
 *
 *
 * PARAMETERS
 *	None
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static kal_uint32 close(void)
{
	pr_debug("E\n");

	/*No Need to implement this function */

	return ERROR_NONE;
}				/*      close  */


/*************************************************************************
 * FUNCTION
 * preview
 *
 * DESCRIPTION
 *	This function start the sensor preview.
 *
 * PARAMETERS
 *	*image_window : address pointer of pixel numbers in one period of HSYNC
 *  *sensor_config_data : address pointer of line numbers in one period of VSYNC
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static kal_uint32 preview(MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *image_window,
			  MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	pr_debug("%s E\n", __func__);

	spin_lock(&imgsensor_drv_lock);
	imgsensor.sensor_mode = IMGSENSOR_MODE_PREVIEW;
	imgsensor.pclk = imgsensor_info.pre.pclk;
	imgsensor.line_length = imgsensor_info.pre.linelength;
	imgsensor.frame_length = imgsensor_info.pre.framelength;
	imgsensor.min_frame_length = imgsensor_info.pre.framelength;
	imgsensor.autoflicker_en = KAL_FALSE;
	spin_unlock(&imgsensor_drv_lock);

	preview_setting();
	set_mirror_flip(imgsensor.mirror);

	return ERROR_NONE;
}				/*      preview   */

/*************************************************************************
 * FUNCTION
 *	capture
 *
 * DESCRIPTION
 *	This function setup the CMOS sensor in capture MY_OUTPUT mode
 *
 * PARAMETERS
 *
 * RETURNS
 *	None
 *
 * GLOBALS AFFECTED
 *
 *************************************************************************/
static kal_uint32 capture(MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *image_window,
			  MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	pr_debug("%s E\n", __func__);
	spin_lock(&imgsensor_drv_lock);
	imgsensor.sensor_mode = IMGSENSOR_MODE_CAPTURE;
	if (imgsensor.current_fps == imgsensor_info.cap1.max_framerate) {
	/* PIP capture: 24fps for less than 13M, 20fps for 16M,15fps for 20M */
		imgsensor.pclk = imgsensor_info.cap1.pclk;
		imgsensor.line_length = imgsensor_info.cap1.linelength;
		imgsensor.frame_length = imgsensor_info.cap1.framelength;
		imgsensor.min_frame_length = imgsensor_info.cap1.framelength;
		imgsensor.autoflicker_en = KAL_FALSE;
	} else if (imgsensor.current_fps == imgsensor_info.cap2.max_framerate) {
		imgsensor.pclk = imgsensor_info.cap2.pclk;
		imgsensor.line_length = imgsensor_info.cap2.linelength;
		imgsensor.frame_length = imgsensor_info.cap2.framelength;
		imgsensor.min_frame_length = imgsensor_info.cap2.framelength;
		imgsensor.autoflicker_en = KAL_FALSE;
	} else {

		if (imgsensor.current_fps != imgsensor_info.cap.max_framerate) {
			pr_debug("Warning: current_fps %d fps is not support, so use cap's setting: %d fps!\n",
				imgsensor.current_fps,
				imgsensor_info.cap.max_framerate / 10);
		}

		imgsensor.pclk = imgsensor_info.cap.pclk;
		imgsensor.line_length = imgsensor_info.cap.linelength;
		imgsensor.frame_length = imgsensor_info.cap.framelength;
		imgsensor.min_frame_length = imgsensor_info.cap.framelength;
		imgsensor.autoflicker_en = KAL_FALSE;
	}
	spin_unlock(&imgsensor_drv_lock);

	capture_setting(imgsensor.current_fps);
	set_mirror_flip(imgsensor.mirror);

	return ERROR_NONE;
}				/* capture() */

static kal_uint32 normal_video(
	MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *image_window,
	MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	pr_debug("%s E\n", __func__);

	spin_lock(&imgsensor_drv_lock);
	imgsensor.sensor_mode = IMGSENSOR_MODE_VIDEO;
	imgsensor.pclk = imgsensor_info.normal_video.pclk;
	imgsensor.line_length = imgsensor_info.normal_video.linelength;
	imgsensor.frame_length = imgsensor_info.normal_video.framelength;
	imgsensor.min_frame_length = imgsensor_info.normal_video.framelength;
	imgsensor.autoflicker_en = KAL_FALSE;
	spin_unlock(&imgsensor_drv_lock);

	normal_video_setting(imgsensor.current_fps);
	set_mirror_flip(imgsensor.mirror);

	return ERROR_NONE;
}				/*      normal_video   */

static kal_uint32 hs_video(MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *image_window,
			   MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	pr_debug("%s E\n", __func__);

	spin_lock(&imgsensor_drv_lock);
	imgsensor.sensor_mode = IMGSENSOR_MODE_HIGH_SPEED_VIDEO;
	imgsensor.pclk = imgsensor_info.hs_video.pclk;
	/* imgsensor.video_mode = KAL_TRUE; */
	imgsensor.line_length = imgsensor_info.hs_video.linelength;
	imgsensor.frame_length = imgsensor_info.hs_video.framelength;
	imgsensor.min_frame_length = imgsensor_info.hs_video.framelength;
	imgsensor.dummy_line = 0;
	imgsensor.dummy_pixel = 0;
	/* imgsensor.current_fps = 300; */
	imgsensor.autoflicker_en = KAL_FALSE;
	spin_unlock(&imgsensor_drv_lock);
	hs_video_setting();
	set_mirror_flip(imgsensor.mirror);

	return ERROR_NONE;
}				/*      hs_video   */

static kal_uint32 slim_video(
	MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *image_window,
	MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	pr_debug("%s E\n", __func__);

	spin_lock(&imgsensor_drv_lock);
	imgsensor.sensor_mode = IMGSENSOR_MODE_SLIM_VIDEO;
	imgsensor.pclk = imgsensor_info.slim_video.pclk;
	/* imgsensor.video_mode = KAL_TRUE; */
	imgsensor.line_length = imgsensor_info.slim_video.linelength;
	imgsensor.frame_length = imgsensor_info.slim_video.framelength;
	imgsensor.min_frame_length = imgsensor_info.slim_video.framelength;
	imgsensor.dummy_line = 0;
	imgsensor.dummy_pixel = 0;
	/* imgsensor.current_fps = 300; */
	imgsensor.autoflicker_en = KAL_FALSE;
	spin_unlock(&imgsensor_drv_lock);
	slim_video_setting();
	set_mirror_flip(imgsensor.mirror);

	return ERROR_NONE;
}				/*      slim_video       */

static kal_uint32 custom1(
	MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT * image_window,
	MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	pr_debug("%s E\n", __func__);

	spin_lock(&imgsensor_drv_lock);
	imgsensor.sensor_mode = IMGSENSOR_MODE_CUSTOM1;
	imgsensor.pclk = imgsensor_info.custom1.pclk;
	/* imgsensor.video_mode = KAL_TRUE; */
	imgsensor.line_length = imgsensor_info.custom1.linelength;
	imgsensor.frame_length = imgsensor_info.custom1.framelength;
	imgsensor.min_frame_length = imgsensor_info.custom1.framelength;
	imgsensor.dummy_line = 0;
	imgsensor.dummy_pixel = 0;
	/* imgsensor.current_fps = 300; */
	imgsensor.autoflicker_en = KAL_FALSE;
	spin_unlock(&imgsensor_drv_lock);
	custom1_setting();
	set_mirror_flip(imgsensor.mirror);

	return ERROR_NONE;
}				/*      custom1       */

static kal_uint32 get_resolution(
	MSDK_SENSOR_RESOLUTION_INFO_STRUCT(*sensor_resolution))
{
	pr_debug("%s E\n", __func__);
	sensor_resolution->SensorFullWidth =
		imgsensor_info.cap.grabwindow_width;
	sensor_resolution->SensorFullHeight =
		imgsensor_info.cap.grabwindow_height;

	sensor_resolution->SensorPreviewWidth =
		imgsensor_info.pre.grabwindow_width;
	sensor_resolution->SensorPreviewHeight =
		imgsensor_info.pre.grabwindow_height;

	sensor_resolution->SensorVideoWidth =
		imgsensor_info.normal_video.grabwindow_width;
	sensor_resolution->SensorVideoHeight =
		imgsensor_info.normal_video.grabwindow_height;

	sensor_resolution->SensorHighSpeedVideoWidth =
		imgsensor_info.hs_video.grabwindow_width;
	sensor_resolution->SensorHighSpeedVideoHeight =
		imgsensor_info.hs_video.grabwindow_height;

	sensor_resolution->SensorSlimVideoWidth =
		imgsensor_info.slim_video.grabwindow_width;
	sensor_resolution->SensorSlimVideoHeight =
		imgsensor_info.slim_video.grabwindow_height;

	sensor_resolution->SensorCustom1Width =
		imgsensor_info.custom1.grabwindow_width;
	sensor_resolution->SensorCustom1Height =
		imgsensor_info.custom1.grabwindow_height;
	return ERROR_NONE;
}				/*      get_resolution  */

static kal_uint32 get_info(enum MSDK_SCENARIO_ID_ENUM scenario_id,
			   MSDK_SENSOR_INFO_STRUCT *sensor_info,
			   MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	/*pr_debug("get_info -> scenario_id = %d\n", scenario_id);*/

	sensor_info->SensorClockPolarity = SENSOR_CLOCK_POLARITY_LOW;

	/* not use */
	sensor_info->SensorClockFallingPolarity = SENSOR_CLOCK_POLARITY_LOW;

	/* inverse with datasheet */
	sensor_info->SensorHsyncPolarity = SENSOR_CLOCK_POLARITY_LOW;

	sensor_info->SensorVsyncPolarity = SENSOR_CLOCK_POLARITY_LOW;
	sensor_info->SensorInterruptDelayLines = 4;	/* not use */
	sensor_info->SensorResetActiveHigh = FALSE;	/* not use */
	sensor_info->SensorResetDelayCount = 5;	/* not use */

	sensor_info->SensroInterfaceType = imgsensor_info.sensor_interface_type;
	sensor_info->MIPIsensorType = imgsensor_info.mipi_sensor_type;
	sensor_info->SettleDelayMode = imgsensor_info.mipi_settle_delay_mode;

	sensor_info->SensorOutputDataFormat =
		imgsensor_info.sensor_output_dataformat;

	sensor_info->CaptureDelayFrame = imgsensor_info.cap_delay_frame;
	sensor_info->PreviewDelayFrame = imgsensor_info.pre_delay_frame;
	sensor_info->VideoDelayFrame = imgsensor_info.video_delay_frame;

	sensor_info->HighSpeedVideoDelayFrame =
		imgsensor_info.hs_video_delay_frame;

	sensor_info->SlimVideoDelayFrame =
		imgsensor_info.slim_video_delay_frame;

	sensor_info->Custom1DelayFrame =
		imgsensor_info.custom1_delay_frame;

	sensor_info->SensorMasterClockSwitch = 0;	/* not use */
	sensor_info->SensorDrivingCurrent = imgsensor_info.isp_driving_current;

	/* The frame of setting shutter default 0 for TG int */
	sensor_info->AEShutDelayFrame = imgsensor_info.ae_shut_delay_frame;

	/* The frame of setting sensor gain*/
	sensor_info->AESensorGainDelayFrame =
				imgsensor_info.ae_sensor_gain_delay_frame;

	sensor_info->AEISPGainDelayFrame =
				imgsensor_info.ae_ispGain_delay_frame;

	sensor_info->IHDR_Support = imgsensor_info.ihdr_support;
	sensor_info->IHDR_LE_FirstLine = imgsensor_info.ihdr_le_firstline;
	sensor_info->SensorModeNum = imgsensor_info.sensor_mode_num;

	/* change pdaf support mode to pdaf VC mode */
	sensor_info->PDAF_Support = 0;
	sensor_info->SensorMIPILaneNumber = imgsensor_info.mipi_lane_num;
	sensor_info->SensorClockFreq = imgsensor_info.mclk;
	sensor_info->SensorClockDividCount = 3;	/* not use */
	sensor_info->SensorClockRisingCount = 0;
	sensor_info->SensorClockFallingCount = 2;	/* not use */
	sensor_info->SensorPixelClockCount = 3;	/* not use */
	sensor_info->SensorDataLatchCount = 2;	/* not use */

	sensor_info->MIPIDataLowPwr2HighSpeedTermDelayCount = 0;
	sensor_info->MIPICLKLowPwr2HighSpeedTermDelayCount = 0;
	sensor_info->SensorWidthSampling = 0;	/* 0 is default 1x */
	sensor_info->SensorHightSampling = 0;	/* 0 is default 1x */
	sensor_info->SensorPacketECCOrder = 1;

	switch (scenario_id) {
	case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		sensor_info->SensorGrabStartX = imgsensor_info.pre.startx;
		sensor_info->SensorGrabStartY = imgsensor_info.pre.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.pre.mipi_data_lp2hs_settle_dc;

		break;
	case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
		sensor_info->SensorGrabStartX = imgsensor_info.cap.startx;
		sensor_info->SensorGrabStartY = imgsensor_info.cap.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.cap.mipi_data_lp2hs_settle_dc;

		break;
	case MSDK_SCENARIO_ID_VIDEO_PREVIEW:

		sensor_info->SensorGrabStartX =
			imgsensor_info.normal_video.startx;
		sensor_info->SensorGrabStartY =
			imgsensor_info.normal_video.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.normal_video.mipi_data_lp2hs_settle_dc;

		break;
	case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
		sensor_info->SensorGrabStartX = imgsensor_info.hs_video.startx;
		sensor_info->SensorGrabStartY = imgsensor_info.hs_video.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.hs_video.mipi_data_lp2hs_settle_dc;

		break;
	case MSDK_SCENARIO_ID_SLIM_VIDEO:
		sensor_info->SensorGrabStartX =
			imgsensor_info.slim_video.startx;
		sensor_info->SensorGrabStartY =
			imgsensor_info.slim_video.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.slim_video.mipi_data_lp2hs_settle_dc;

		break;
	case MSDK_SCENARIO_ID_CUSTOM1:
		sensor_info->SensorGrabStartX =
			imgsensor_info.custom1.startx;
		sensor_info->SensorGrabStartY =
			imgsensor_info.custom1.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.custom1.mipi_data_lp2hs_settle_dc;

		break;
	default:
		sensor_info->SensorGrabStartX = imgsensor_info.pre.startx;
		sensor_info->SensorGrabStartY = imgsensor_info.pre.starty;

		sensor_info->MIPIDataLowPwr2HighSpeedSettleDelayCount =
			imgsensor_info.pre.mipi_data_lp2hs_settle_dc;
		break;
	}

	return ERROR_NONE;
}				/*      get_info  */


static kal_uint32 control(enum MSDK_SCENARIO_ID_ENUM scenario_id,
			  MSDK_SENSOR_EXPOSURE_WINDOW_STRUCT *image_window,
			  MSDK_SENSOR_CONFIG_STRUCT *sensor_config_data)
{
	spin_lock(&imgsensor_drv_lock);
	imgsensor.current_scenario_id = scenario_id;
	spin_unlock(&imgsensor_drv_lock);
	lastcamstate = camstate;
	camstate = scenario_id;

	switch (scenario_id) {
	case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		preview(image_window, sensor_config_data);
		break;
	case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
		capture(image_window, sensor_config_data);
		break;
	case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
		normal_video(image_window, sensor_config_data);
		break;
	case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
		hs_video(image_window, sensor_config_data);
		break;
	case MSDK_SCENARIO_ID_SLIM_VIDEO:
		slim_video(image_window, sensor_config_data);
		break;
	case MSDK_SCENARIO_ID_CUSTOM1:
		custom1(image_window, sensor_config_data);
		break;
	default:
		pr_debug("Error ScenarioId setting");
		preview(image_window, sensor_config_data);
		return ERROR_INVALID_SCENARIO_ID;
	}
	return ERROR_NONE;
}				/* control() */

static kal_uint32 set_video_mode(UINT16 framerate)
{
	/* //pr_debug("framerate = %d\n ", framerate); */
	/* SetVideoMode Function should fix framerate */
	if (framerate == 0)
		/* Dynamic frame rate */
		return ERROR_NONE;
	spin_lock(&imgsensor_drv_lock);
	if ((framerate == 300) && (imgsensor.autoflicker_en == KAL_TRUE))
		imgsensor.current_fps = 296;
	else if ((framerate == 150) && (imgsensor.autoflicker_en == KAL_TRUE))
		imgsensor.current_fps = 146;
	else
		imgsensor.current_fps = framerate;
	spin_unlock(&imgsensor_drv_lock);
	set_max_framerate(imgsensor.current_fps, 1);

	return ERROR_NONE;
}

static kal_uint32 set_auto_flicker_mode(
	kal_bool enable, UINT16 framerate)
{
	pr_debug("enable = %d, framerate = %d\n", enable, framerate);
	spin_lock(&imgsensor_drv_lock);
	if (enable)		/* enable auto flicker */
		imgsensor.autoflicker_en = KAL_TRUE;
	else			/* Cancel Auto flick */
		imgsensor.autoflicker_en = KAL_FALSE;
	spin_unlock(&imgsensor_drv_lock);
	return ERROR_NONE;
}

static kal_uint32 set_max_framerate_by_scenario(
enum MSDK_SCENARIO_ID_ENUM scenario_id,	MUINT32 framerate)
{
	kal_uint32 frame_length;

	pr_debug("scenario_id = %d, framerate = %d\n", scenario_id, framerate);

	switch (scenario_id) {
	case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		frame_length = imgsensor_info.pre.pclk
			/ framerate * 10 / imgsensor_info.pre.linelength;
		spin_lock(&imgsensor_drv_lock);

		imgsensor.dummy_line =
			(frame_length > imgsensor_info.pre.framelength)
			? (frame_length - imgsensor_info.pre.framelength) : 0;

		imgsensor.frame_length =
			imgsensor_info.pre.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		break;
	case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
		if (framerate == 0)
			return ERROR_NONE;
		frame_length = imgsensor_info.normal_video.pclk
		    / framerate * 10 / imgsensor_info.normal_video.linelength;

		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
	    (frame_length > imgsensor_info.normal_video.framelength)
	  ? (frame_length - imgsensor_info.normal_video.  framelength) : 0;

		imgsensor.frame_length =
		 imgsensor_info.normal_video.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		break;

	case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
	if (imgsensor.current_fps == imgsensor_info.cap1.max_framerate) {

		frame_length = imgsensor_info.cap1.pclk
			/ framerate * 10 / imgsensor_info.cap1.linelength;

		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
		      (frame_length > imgsensor_info.cap1.framelength)
		    ? (frame_length - imgsensor_info.cap1.  framelength) : 0;

		imgsensor.frame_length =
			imgsensor_info.cap1.framelength + imgsensor.dummy_line;
		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
	} else if (imgsensor.current_fps == imgsensor_info.cap2.max_framerate) {
		frame_length = imgsensor_info.cap2.pclk
			/ framerate * 10 / imgsensor_info.cap2.linelength;
		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
		      (frame_length > imgsensor_info.cap2.framelength)
		    ? (frame_length - imgsensor_info.cap2.  framelength) : 0;

		imgsensor.frame_length =
			imgsensor_info.cap2.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
	} else {
		if (imgsensor.current_fps != imgsensor_info.cap.max_framerate)
			pr_debug("Warning: current_fps %d fps is not support, so use cap's setting: %d fps!\n",
				framerate,
				imgsensor_info.cap.max_framerate / 10);

		frame_length = imgsensor_info.cap.pclk
			/ framerate * 10 / imgsensor_info.cap.linelength;
		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
			(frame_length > imgsensor_info.cap.framelength)
			? (frame_length - imgsensor_info.cap.framelength) : 0;
		imgsensor.frame_length =
			imgsensor_info.cap.framelength + imgsensor.dummy_line;
		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
	}
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		break;

	case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
		frame_length = imgsensor_info.hs_video.pclk
			/ framerate * 10 / imgsensor_info.hs_video.linelength;
		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
		  (frame_length > imgsensor_info.hs_video.framelength)
		? (frame_length - imgsensor_info.hs_video.  framelength) : 0;

		imgsensor.frame_length =
		    imgsensor_info.hs_video.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		break;
	case MSDK_SCENARIO_ID_SLIM_VIDEO:
		frame_length = imgsensor_info.slim_video.pclk
			/ framerate * 10 / imgsensor_info.slim_video.linelength;

		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
		  (frame_length > imgsensor_info.slim_video.framelength)
		? (frame_length - imgsensor_info.slim_video.  framelength) : 0;

		imgsensor.frame_length =
		  imgsensor_info.slim_video.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		break;
	case MSDK_SCENARIO_ID_CUSTOM1:
		frame_length = imgsensor_info.custom1.pclk
			/ framerate * 10 / imgsensor_info.custom1.linelength;

		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
		  (frame_length > imgsensor_info.custom1.framelength)
		? (frame_length - imgsensor_info.custom1.  framelength) : 0;

		imgsensor.frame_length =
		  imgsensor_info.custom1.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		break;

	default:		/* coding with  preview scenario by default */
		frame_length = imgsensor_info.pre.pclk
			/ framerate * 10 / imgsensor_info.pre.linelength;

		spin_lock(&imgsensor_drv_lock);
		imgsensor.dummy_line =
			(frame_length > imgsensor_info.pre.framelength)
			? (frame_length - imgsensor_info.pre.framelength) : 0;

		imgsensor.frame_length =
			imgsensor_info.pre.framelength + imgsensor.dummy_line;

		imgsensor.min_frame_length = imgsensor.frame_length;
		spin_unlock(&imgsensor_drv_lock);
		if (imgsensor.frame_length > imgsensor.shutter)
			set_dummy();
		else {
			/*No need to set*/
			pr_debug("frame_length %d < shutter %d",
				imgsensor.frame_length, imgsensor.shutter);
		}
		pr_debug("error scenario_id = %d, we use preview scenario\n",
		scenario_id);
		break;
	}
	return ERROR_NONE;
}


static kal_uint32 get_default_framerate_by_scenario(
enum MSDK_SCENARIO_ID_ENUM scenario_id, MUINT32 *framerate)
{
	/*pr_debug("scenario_id = %d\n", scenario_id);*/

	switch (scenario_id) {
	case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		*framerate = imgsensor_info.pre.max_framerate;
		break;
	case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
		*framerate = imgsensor_info.normal_video.max_framerate;
		break;
	case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
		*framerate = imgsensor_info.cap.max_framerate;
		break;
	case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
		*framerate = imgsensor_info.hs_video.max_framerate;
		break;
	case MSDK_SCENARIO_ID_SLIM_VIDEO:
		*framerate = imgsensor_info.slim_video.max_framerate;
		break;
	case MSDK_SCENARIO_ID_CUSTOM1:
		*framerate = imgsensor_info.custom1.max_framerate;
		break;
	default:
		break;
	}

	return ERROR_NONE;
}

static kal_uint32 set_test_pattern_mode(kal_bool enable)
{
	pr_debug("enable: %d\n", enable);

	if (enable) {
/* 0 : Normal, 1 : Solid Color, 2 : Color Bar, 3 : Shade Color Bar, 4 : PN9 */
		write_cmos_sensor(0x0600, 0x0002);
	} else {
		write_cmos_sensor(0x0600, 0x0000);
	}
	spin_lock(&imgsensor_drv_lock);
	imgsensor.test_pattern = enable;
	spin_unlock(&imgsensor_drv_lock);
	return ERROR_NONE;
}
static kal_uint32 get_sensor_temperature(void)
{
	UINT8 temperature;
	INT32 temperature_convert;

	temperature = read_cmos_sensor_8(0x013a);

	if (temperature >= 0x0 && temperature <= 0x78)
		temperature_convert = temperature;
	else
		temperature_convert = -1;

	/*pr_info("temp_c(%d), read_reg(%d), enable %d\n",
	 *	temperature_convert, temperature, read_cmos_sensor_8(0x0138));
	 */

	return temperature_convert;
}
#if 1
#define FOUR_CELL_SIZE 3072//size = 3072 = 0xc00
static int Is_Read_4Cell;
static char Four_Cell_Array[FOUR_CELL_SIZE + 2];

static void read_4cell_from_eeprom(char *data)
{
	int ret;
	int addr = 0x763;/*Start of 4 cell data*/
	char pu_send_cmd[2] = { (char)(addr >> 8), (char)(addr & 0xFF) };

	pu_send_cmd[0] = (char)(addr >> 8);
	pu_send_cmd[1] = (char)(addr & 0xFF);

	/* Check I2C is normal */
	ret = iReadRegI2C(pu_send_cmd, 2, data, 1, EEPROM_READ_ID);
	if (ret != 0) {
		pr_debug("iReadRegI2C error");
		return;
	}

	if (Is_Read_4Cell != 1) {
		pr_debug("Need to read i2C");

		Four_Cell_Array[0] = (FOUR_CELL_SIZE & 0xff);/*Low*/
		Four_Cell_Array[1] = ((FOUR_CELL_SIZE >> 8) & 0xff);/*High*/

		/*Multi-Read*/
		iReadRegI2C(pu_send_cmd, 2, &Four_Cell_Array[2],
					FOUR_CELL_SIZE, EEPROM_READ_ID);
		Is_Read_4Cell = 1;
	}

	memcpy(data, Four_Cell_Array, FOUR_CELL_SIZE);
}
#endif
#if 0
static char *features[300] = {
	"SENSOR_FEATURE_BEGIN,                              ",
	"SENSOR_FEATURE_GET_RESOLUTION,                     ",
	"SENSOR_FEATURE_GET_PERIOD,                         ",
	"SENSOR_FEATURE_GET_PIXEL_CLOCK_FREQ,               ",
	"SENSOR_FEATURE_SET_ESHUTTER,                       ",
	"SENSOR_FEATURE_SET_NIGHTMODE,                      ",
	"SENSOR_FEATURE_SET_GAIN,                           ",
	"SENSOR_FEATURE_SET_DUAL_GAIN,                      ",
	"SENSOR_FEATURE_SET_GAIN_AND_ESHUTTER,              ",
	"SENSOR_FEATURE_SET_FLASHLIGHT,                     ",
	"SENSOR_FEATURE_SET_ISP_MASTER_CLOCK_FREQ,          ",
	"SENSOR_FEATURE_SET_REGISTER,                       ",
	"SENSOR_FEATURE_GET_REGISTER,                       ",
	"SENSOR_FEATURE_SET_CCT_REGISTER,                   ",
	"SENSOR_FEATURE_GET_CCT_REGISTER,                   ",
	"SENSOR_FEATURE_SET_ENG_REGISTER,                   ",
	"SENSOR_FEATURE_GET_ENG_REGISTER,                   ",
	"SENSOR_FEATURE_GET_REGISTER_DEFAULT,               ",
	"SENSOR_FEATURE_GET_CONFIG_PARA,                    ",
	"SENSOR_FEATURE_CAMERA_PARA_TO_SENSOR,              ",
	"SENSOR_FEATURE_SENSOR_TO_CAMERA_PARA,              ",
	"SENSOR_FEATURE_GET_GROUP_COUNT,                    ",
	"SENSOR_FEATURE_GET_GROUP_INFO,                     ",
	"SENSOR_FEATURE_GET_ITEM_INFO,                      ",
	"SENSOR_FEATURE_SET_ITEM_INFO,                      ",
	"SENSOR_FEATURE_GET_ENG_INFO,                       ",
	"SENSOR_FEATURE_GET_LENS_DRIVER_ID,                 ",
	"SENSOR_FEATURE_SET_YUV_CMD,                        ",
	"SENSOR_FEATURE_SET_VIDEO_MODE,                     ",
	"SENSOR_FEATURE_SET_TARGET_FRAME_RATE,              ",
	"SENSOR_FEATURE_SET_CALIBRATION_DATA,               ",
	"SENSOR_FEATURE_SET_SENSOR_SYNC,                    ",
	"SENSOR_FEATURE_INITIALIZE_AF,                      ",
	"SENSOR_FEATURE_CONSTANT_AF,                        ",
	"SENSOR_FEATURE_INFINITY_AF,                        ",
	"SENSOR_FEATURE_MOVE_FOCUS_LENS,                    ",
	"SENSOR_FEATURE_GET_AF_STATUS,                      ",
	"SENSOR_FEATURE_GET_AE_STATUS,                      ",
	"SENSOR_FEATURE_GET_AWB_STATUS,                     ",
	"SENSOR_FEATURE_GET_AF_INF,                         ",
	"SENSOR_FEATURE_GET_AF_MACRO,                       ",
	"SENSOR_FEATURE_CHECK_SENSOR_ID,                    ",
	"SENSOR_FEATURE_SET_AUTO_FLICKER_MODE,              ",
	"SENSOR_FEATURE_SET_TEST_PATTERN,                   ",
	"SENSOR_FEATURE_SET_SOFTWARE_PWDN,                  ",
	"SENSOR_FEATURE_SINGLE_FOCUS_MODE,                  ",
	"SENSOR_FEATURE_CANCEL_AF,                          ",
	"SENSOR_FEATURE_SET_AF_WINDOW,                      ",
	"SENSOR_FEATURE_GET_EV_AWB_REF,                     ",
	"SENSOR_FEATURE_GET_SHUTTER_GAIN_AWB_GAIN,          ",
	"SENSOR_FEATURE_GET_AF_MAX_NUM_FOCUS_AREAS,         ",
	"SENSOR_FEATURE_GET_AE_MAX_NUM_METERING_AREAS,      ",
	"SENSOR_FEATURE_SET_AE_WINDOW,                      ",
	"SENSOR_FEATURE_GET_EXIF_INFO,                      ",
	"SENSOR_FEATURE_GET_DELAY_INFO,                     ",
	"SENSOR_FEATURE_SET_SLAVE_I2C_ID,                   ",
	"SENSOR_FEATURE_SUSPEND,                            ",
	"SENSOR_FEATURE_RESUME,                             ",
	"SENSOR_FEATURE_SET_MAX_FRAME_RATE_BY_SCENARIO,     ",
	"SENSOR_FEATURE_GET_DEFAULT_FRAME_RATE_BY_SCENARIO, ",
	"SENSOR_FEATURE_GET_AE_AWB_LOCK_INFO,               ",
	"SENSOR_FEATURE_AUTOTEST_CMD,                       ",
	"SENSOR_FEATURE_GET_TEST_PATTERN_CHECKSUM_VALUE,    ",
	"SENSOR_FEATURE_GET_TEMPERATURE_VALUE,              ",
	"SENSOR_FEATURE_GET_SENSOR_CURRENT_TEMPERATURE,     ",
	"SENSOR_FEATURE_GET_AE_FLASHLIGHT_INFO,             ",
	"SENSOR_FEATURE_GET_TRIGGER_FLASHLIGHT_INFO,        ",
	"SENSOR_FEATURE_SET_YUV_3A_CMD,                     ",
	"SENSOR_FEATURE_SET_N3D_I2C_STREAM_REGDATA,         ",
	"SENSOR_FEATURE_SET_N3D_STOP_STREAMING,             ",
	"SENSOR_FEATURE_SET_N3D_START_STREAMING,            ",
	"SENSOR_FEATURE_GET_SENSOR_N3D_STREAM_TO_VSYNC_TIME,",
	"SENSOR_FEATURE_SET_ESHUTTER_GAIN,                  ",
	"SENSOR_FEATURE_SET_OB_LOCK,                        ",
	"SENSOR_FEATURE_SET_SENSOR_OTP_AWB_CMD,             ",
	"SENSOR_FEATURE_SET_SENSOR_OTP_LSC_CMD,             ",
	"SENSOR_FEATURE_GET_YUV_CAPTURE_OUTPUT_JPEG,        ",
	"SENSOR_FEATURE_SET_YUV_JPEG_PARA,                  ",
	"SENSOR_FEATURE_GET_YUV_JPEG_INFO,                  ",
	"SENSOR_FEATURE_SET_FRAMERATE,                      ",
	"SENSOR_FEATURE_SET_HDR,                            ",
	"SENSOR_FEATURE_GET_CROP_INFO,                      ",
	"SENSOR_FEATURE_GET_VC_INFO,                        ",
	"SENSOR_FEATURE_SET_IHDR_SHUTTER_GAIN,              ",
	"SENSOR_FEATURE_SET_AWB_GAIN,                       ",
	"SENSOR_FEATURE_SET_MIN_MAX_FPS,                    ",
	"SENSOR_FEATURE_GET_PDAF_INFO,                      ",
	"SENSOR_FEATURE_GET_PDAF_DATA,                      ",
	"SENSOR_FEATURE_SET_PDFOCUS_AREA,                   ",
	"SENSOR_FEATURE_GET_SENSOR_PDAF_CAPACITY,           ",
	"SENSOR_FEATURE_DEBUG_IMGSENSOR,                    ",
	"SENSOR_FEATURE_SET_HDR_SHUTTER,                    ",
	"SENSOR_FEATURE_SET_ISO,                            ",
	"SENSOR_FEATURE_SET_PDAF,                           ",
	"SENSOR_FEATURE_SET_SHUTTER_FRAME_TIME,             ",
	"SENSOR_FEATURE_SET_SHUTTER_BUF_MODE,               ",
	"SENSOR_FEATURE_SET_GAIN_BUF_MODE,                  ",
	"SENSOR_FEATURE_SET_I2C_BUF_MODE_EN,                ",
	"SENSOR_FEATURE_GET_SENSOR_HDR_CAPACITY,            ",
	"SENSOR_FEATURE_GET_PDAF_TYPE,                      ",
	"SENSOR_FEATURE_SET_PDAF_TYPE,                      ",
	"SENSOR_FEATURE_GET_PDAF_REG_SETTING,               ",
	"SENSOR_FEATURE_SET_PDAF_REG_SETTING,               ",
	"SENSOR_FEATURE_SET_STREAMING_SUSPEND,              ",
	"SENSOR_FEATURE_SET_STREAMING_RESUME,               ",
	"SENSOR_FEATURE_OPEN,                               ",
	"SENSOR_FEATURE_CLOSE,                              ",
	"SENSOR_FEATURE_SET_DRIVER,                         ",
	"SENSOR_FEATURE_CHECK_IS_ALIVE,                     ",
	"SENSOR_FEATURE_GET_4CELL_DATA,                     ",
	"SENSOR_FEATURE_SET_WAKE_LOCK,                      ",
	"SENSOR_FEATURE_GET_MIPI_PIXEL_RATE,                ",
	"SENSOR_FEATURE_SET_HDR_ATR,                        ",
	"SENSOR_FEATURE_SET_HDR_TRI_GAIN,                   ",
	"SENSOR_FEATURE_SET_HDR_TRI_SHUTTER,                ",
	"SENSOR_FEATURE_SET_LSC_TBL,                        ",
	"SENSOR_FEATURE_GET_SENSOR_SYNC_MODE_CAPACITY,      ",
	"SENSOR_FEATURE_GET_SENSOR_SYNC_MODE,               ",
	"SENSOR_FEATURE_SET_SENSOR_SYNC_MODE,               ",
	"SENSOR_FEATURE_GET_PIXEL_RATE,                     ",
	"SENSOR_FEATURE_MAX				    "
};
#endif

static kal_uint32 feature_control(MSDK_SENSOR_FEATURE_ENUM feature_id,
UINT8 *feature_para, UINT32 *feature_para_len)
{
	UINT16 *feature_return_para_16 = (UINT16 *) feature_para;
	UINT16 *feature_data_16 = (UINT16 *) feature_para;
	UINT32 *feature_return_para_32 = (UINT32 *) feature_para;
	UINT32 *feature_data_32 = (UINT32 *) feature_para;
	INT32 *feature_return_para_i32 = (INT32 *) feature_para;
	unsigned long long *feature_data = (unsigned long long *)feature_para;

	/* struct SET_PD_BLOCK_INFO_T *PDAFinfo; */
	/* struct SENSOR_VC_INFO_STRUCT *pvcinfo; */
	struct SENSOR_WINSIZE_INFO_STRUCT *wininfo;

	MSDK_SENSOR_REG_INFO_STRUCT *sensor_reg_data =
		(MSDK_SENSOR_REG_INFO_STRUCT *) feature_para;

	switch (feature_id) {
	case SENSOR_FEATURE_GET_PERIOD:
		*feature_return_para_16++ = imgsensor.line_length;
		*feature_return_para_16 = imgsensor.frame_length;
		*feature_para_len = 4;
		break;
	case SENSOR_FEATURE_GET_PIXEL_CLOCK_FREQ:
#if 0
		pr_debug(
			"feature_Control imgsensor.pclk = %d,imgsensor.current_fps = %d\n",
			imgsensor.pclk, imgsensor.current_fps);
#endif
		*feature_return_para_32 = imgsensor.pclk;
		*feature_para_len = 4;
		break;
	case SENSOR_FEATURE_SET_ESHUTTER:
		set_shutter(*feature_data);
		break;
	case SENSOR_FEATURE_SET_NIGHTMODE:
	/* night_mode((BOOL) *feature_data); no need to implement this mode */
		break;
	case SENSOR_FEATURE_SET_GAIN:
		set_gain((UINT16) *feature_data);
		break;
	case SENSOR_FEATURE_SET_FLASHLIGHT:
		break;
	case SENSOR_FEATURE_SET_ISP_MASTER_CLOCK_FREQ:
		break;

	case SENSOR_FEATURE_SET_REGISTER:
		write_cmos_sensor_8(sensor_reg_data->RegAddr,
			sensor_reg_data->RegData);
		break;

	case SENSOR_FEATURE_GET_REGISTER:
		sensor_reg_data->RegData =
			read_cmos_sensor_8(sensor_reg_data->RegAddr);
		break;

	case SENSOR_FEATURE_GET_LENS_DRIVER_ID:
		/* get the lens driver ID from EEPROM or
		 * just return LENS_DRIVER_ID_DO_NOT_CARE
		 */
		/* if EEPROM does not exist in camera module. */
		*feature_return_para_32 = LENS_DRIVER_ID_DO_NOT_CARE;
		*feature_para_len = 4;
		break;
	case SENSOR_FEATURE_SET_VIDEO_MODE:
		set_video_mode(*feature_data);
		break;
	case SENSOR_FEATURE_CHECK_SENSOR_ID:
		get_imgsensor_id(feature_return_para_32);
		break;
	case SENSOR_FEATURE_SET_AUTO_FLICKER_MODE:
		set_auto_flicker_mode((BOOL) (*feature_data_16),
					*(feature_data_16 + 1));
		break;
	case SENSOR_FEATURE_SET_MAX_FRAME_RATE_BY_SCENARIO:
		set_max_framerate_by_scenario(
	    (enum MSDK_SCENARIO_ID_ENUM) *feature_data, *(feature_data + 1));
		break;

	case SENSOR_FEATURE_GET_DEFAULT_FRAME_RATE_BY_SCENARIO:
		get_default_framerate_by_scenario(
			(enum MSDK_SCENARIO_ID_ENUM) *(feature_data),
			  (MUINT32 *) (uintptr_t) (*(feature_data + 1)));
		break;
	case SENSOR_FEATURE_SET_TEST_PATTERN:
		set_test_pattern_mode((BOOL) (*feature_data));
		break;

	/* for factory mode auto testing */
	case SENSOR_FEATURE_GET_TEST_PATTERN_CHECKSUM_VALUE:
		*feature_return_para_32 = imgsensor_info.checksum_value;
		*feature_para_len = 4;
		break;
	case SENSOR_FEATURE_SET_FRAMERATE:
		pr_debug("current fps :%d\n", *feature_data_32);
		spin_lock(&imgsensor_drv_lock);
		imgsensor.current_fps = (UINT16)*feature_data_32;
		spin_unlock(&imgsensor_drv_lock);
		break;
	case SENSOR_FEATURE_SET_HDR:
		pr_debug("ihdr enable :%d\n", *feature_data_32);
		spin_lock(&imgsensor_drv_lock);
		imgsensor.hdr_mode = (UINT8)*feature_data_32;
		// imgsensor.hdr_mode = 9;
		// force set hdr_mode to zHDR
		spin_unlock(&imgsensor_drv_lock);
		break;

	case SENSOR_FEATURE_GET_CROP_INFO:
		/* pr_debug("SENSOR_FEATURE_GET_CROP_INFO scenarioId:%d\n",
		 *	(UINT32) *feature_data);
		 */

		wininfo =
	(struct SENSOR_WINSIZE_INFO_STRUCT *) (uintptr_t) (*(feature_data + 1));

		switch (*feature_data_32) {
		case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
			memcpy((void *)wininfo,
				(void *)&imgsensor_winsize_info[1],
			       sizeof(struct SENSOR_WINSIZE_INFO_STRUCT));
			break;
		case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
			memcpy((void *)wininfo,
				(void *)&imgsensor_winsize_info[2],
			       sizeof(struct SENSOR_WINSIZE_INFO_STRUCT));
			break;
		case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
			memcpy((void *)wininfo,
				(void *)&imgsensor_winsize_info[3],
			       sizeof(struct SENSOR_WINSIZE_INFO_STRUCT));
			break;
		case MSDK_SCENARIO_ID_SLIM_VIDEO:
			memcpy((void *)wininfo,
				(void *)&imgsensor_winsize_info[4],
			       sizeof(struct SENSOR_WINSIZE_INFO_STRUCT));
			break;
		case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		default:
			memcpy((void *)wininfo,
				(void *)&imgsensor_winsize_info[0],
			       sizeof(struct SENSOR_WINSIZE_INFO_STRUCT));
			break;
		}
		break;
	case SENSOR_FEATURE_SET_IHDR_SHUTTER_GAIN:
		pr_debug("SENSOR_SET_SENSOR_IHDR LE=%d, SE=%d, Gain=%d\n",
			(UINT16) *feature_data,
			(UINT16) *(feature_data + 1),
			(UINT16) *(feature_data + 2));

/* ihdr_write_shutter_gain((UINT16)*feature_data,(UINT16)*(feature_data+1),
 * (UINT16)*(feature_data+2));
 */
		break;
	case SENSOR_FEATURE_SET_AWB_GAIN:
		break;
	case SENSOR_FEATURE_SET_HDR_SHUTTER:
		pr_debug("SENSOR_FEATURE_SET_HDR_SHUTTER LE=%d, SE=%d\n",
			(UINT16) *feature_data,
			(UINT16) *(feature_data + 1));
/* ihdr_write_shutter((UINT16)*feature_data,(UINT16)*(feature_data+1)); */
		break;

	case SENSOR_FEATURE_GET_4CELL_DATA:/*get 4 cell data from eeprom*/
	{
		int type = (kal_uint16)(*feature_data);
		char *data = (char *)(uintptr_t)(*(feature_data+1));

		if (type == FOUR_CELL_CAL_TYPE_XTALK_CAL) {
			pr_debug("Read Cross Talk Start");
			read_4cell_from_eeprom(data);
			pr_debug("Read Cross Talk = %02x %02x %02x %02x %02x %02x\n",
				(UINT16)data[0], (UINT16)data[1],
				(UINT16)data[2], (UINT16)data[3],
				(UINT16)data[4], (UINT16)data[5]);
		}
		break;
	}


		/******************** PDAF START >>> *********/
		/*
		 * case SENSOR_FEATURE_GET_PDAF_INFO:
		 * pr_debug("SENSOR_FEATURE_GET_PDAF_INFO scenarioId:%d\n",
		 * (UINT16)*feature_data);
		 * PDAFinfo =
		 * (struct SET_PD_BLOCK_INFO_T *)(uintptr_t)(*(feature_data+1));
		 * switch (*feature_data) {
		 * case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG: //full
		 * case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
		 * case MSDK_SCENARIO_ID_CAMERA_PREVIEW: //2x2 binning
		 * memcpy((void *)PDAFinfo,
		 * (void *)&imgsensor_pd_info,
		 * sizeof(struct SET_PD_BLOCK_INFO_T)); //need to check
		 * break;
		 * case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
		 * case MSDK_SCENARIO_ID_SLIM_VIDEO:
		 * default:
		 * break;
		 * }
		 * break;
		 * case SENSOR_FEATURE_GET_VC_INFO:
		 * pr_debug("SENSOR_FEATURE_GET_VC_INFO %d\n",
		 * (UINT16)*feature_data);
		 * pvcinfo =
		 * (struct SENSOR_VC_INFO_STRUCT *)
		 * (uintptr_t)(*(feature_data+1));
		 * switch (*feature_data_32) {
		 * case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
		 * memcpy((void *)pvcinfo,(void *)&SENSOR_VC_INFO[2],
		 * sizeof(struct SENSOR_VC_INFO_STRUCT));
		 * break;
		 * case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
		 * memcpy((void *)pvcinfo,(void *)&SENSOR_VC_INFO[1],
		 * sizeof(struct SENSOR_VC_INFO_STRUCT));
		 * break;
		 * case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		 * default:
		 * memcpy((void *)pvcinfo,(void *)&SENSOR_VC_INFO[0],
		 * sizeof(struct SENSOR_VC_INFO_STRUCT));
		 * break;
		 * }
		 * break;
		 * case SENSOR_FEATURE_GET_SENSOR_PDAF_CAPACITY:
		 * pr_debug(
		 * "SENSOR_FEATURE_GET_SENSOR_PDAF_CAPACITY scenarioId:%d\n",
		 * (UINT16)*feature_data);
		 * //PDAF capacity enable or not
		 * switch (*feature_data) {
		 * case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
		 * (MUINT32 *)(uintptr_t)(*(feature_data+1)) = 1;
		 * break;
		 * case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
		 * *(MUINT32 *)(uintptr_t)(*(feature_data+1)) = 1;
		 * // video & capture use same setting
		 * break;
		 * case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
		 * *(MUINT32 *)(uintptr_t)(*(feature_data+1)) = 0;
		 * break;
		 * case MSDK_SCENARIO_ID_SLIM_VIDEO:
		 * //need to check
		 * *(MUINT32 *)(uintptr_t)(*(feature_data+1)) = 0;
		 * break;
		 * case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		 * *(MUINT32 *)(uintptr_t)(*(feature_data+1)) = 1;
		 * break;
		 * default:
		 * *(MUINT32 *)(uintptr_t)(*(feature_data+1)) = 0;
		 * break;
		 * }
		 * break;
		 * case SENSOR_FEATURE_GET_PDAF_DATA: //get cal data from eeprom
		 * pr_debug("SENSOR_FEATURE_GET_PDAF_DATA\n");
		 * read_2T7_eeprom((kal_uint16 )(*feature_data),
		 * (char*)(uintptr_t)(*(feature_data+1)),
		 * (kal_uint32)(*(feature_data+2)));
		 * pr_debug("SENSOR_FEATURE_GET_PDAF_DATA success\n");
		 * break;
		 * case SENSOR_FEATURE_SET_PDAF:
		 * pr_debug("PDAF mode :%d\n", *feature_data_16);
		 * imgsensor.pdaf_mode= *feature_data_16;
		 * break;
		 */
		/******************** PDAF END   <<< *********/
	case SENSOR_FEATURE_SET_SHUTTER_FRAME_TIME:
		set_shutter_frame_length((UINT16)(*feature_data),
						(UINT16)(*(feature_data + 1)));
		break;
	case SENSOR_FEATURE_SET_STREAMING_SUSPEND:
		pr_debug("SENSOR_FEATURE_SET_STREAMING_SUSPEND\n");
		streaming_control(KAL_FALSE);
		break;
	case SENSOR_FEATURE_SET_STREAMING_RESUME:
		pr_debug("SENSOR_FEATURE_SET_STREAMING_RESUME, shutter:%llu\n",
			*feature_data);
		if (*feature_data != 0)
			set_shutter(*feature_data);
		streaming_control(KAL_TRUE);
		break;
	case SENSOR_FEATURE_GET_TEMPERATURE_VALUE:
		*feature_return_para_i32 = get_sensor_temperature();
		*feature_para_len = 4;
		break;
	case SENSOR_FEATURE_GET_PIXEL_RATE:
		switch (*feature_data) {
		case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
			(imgsensor_info.cap.pclk /
			(imgsensor_info.cap.linelength - 80))*
			imgsensor_info.cap.grabwindow_width;

			break;
		case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
			(imgsensor_info.normal_video.pclk /
			(imgsensor_info.normal_video.linelength - 80))*
			imgsensor_info.normal_video.grabwindow_width;

			break;
		case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
			(imgsensor_info.hs_video.pclk /
			(imgsensor_info.hs_video.linelength - 80))*
			imgsensor_info.hs_video.grabwindow_width;

			break;
		case MSDK_SCENARIO_ID_SLIM_VIDEO:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
			(imgsensor_info.slim_video.pclk /
			(imgsensor_info.slim_video.linelength - 80))*
			imgsensor_info.slim_video.grabwindow_width;

			break;
		case MSDK_SCENARIO_ID_CUSTOM1:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
			(imgsensor_info.custom1.pclk /
			(imgsensor_info.custom1.linelength - 80))*
			imgsensor_info.custom1.grabwindow_width;

			break;
		case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		default:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
			(imgsensor_info.pre.pclk /
			(imgsensor_info.pre.linelength - 80))*
			imgsensor_info.pre.grabwindow_width;
			break;
		}
		break;

	case SENSOR_FEATURE_GET_MIPI_PIXEL_RATE:

		switch (*feature_data) {
		case MSDK_SCENARIO_ID_CAMERA_CAPTURE_JPEG:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
				imgsensor_info.cap.mipi_pixel_rate;
			break;
		case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
				imgsensor_info.normal_video.mipi_pixel_rate;
			break;
		case MSDK_SCENARIO_ID_HIGH_SPEED_VIDEO:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
				imgsensor_info.hs_video.mipi_pixel_rate;
			break;
		case MSDK_SCENARIO_ID_SLIM_VIDEO:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
				imgsensor_info.slim_video.mipi_pixel_rate;
			break;
		case MSDK_SCENARIO_ID_CUSTOM1:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
				imgsensor_info.custom1.mipi_pixel_rate;
			break;
		case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
		default:
			*(MUINT32 *)(uintptr_t)(*(feature_data + 1)) =
				imgsensor_info.pre.mipi_pixel_rate;
			break;
		}
		break;
	default:
		break;
	}

	return ERROR_NONE;
}				/*      feature_control()  */

static struct SENSOR_FUNCTION_STRUCT sensor_func = {
	open,
	get_info,
	get_resolution,
	feature_control,
	control,
	close
};

UINT32 S5KGW1SP_MIPI_RAW_SensorInit(struct SENSOR_FUNCTION_STRUCT **pfFunc)
{
	/* To Do : Check Sensor status here */
	if (pfFunc != NULL)
		*pfFunc = &sensor_func;
	return ERROR_NONE;
}
